how to achieve this problem?i am having table with two
colums like empno,gender.
in gender column, i am having records male,female like that
.my final output will be
male female
5 6
Answer Posted / shivaindu
SQL> select sum(decode(gender, 'male', 1)) as Male,
sum(decode(gender, 'female', 1)) as Female from
emp1;
MALE FEMALE
---------- ----------
9 7
Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
Explain the select statement in sql?
Which nosql database is best?
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?
How do I install sql?
What is mdf ldf and ndf?
What is lookup table in sql?
Is sql a scripting language?
What is nosql example?
What is the syntax to add a record to a table?
Why truncate is faster than delete?
What is the difference between a primary key and a clustered index?
What is the use of function in sql?
What are the two types of exceptions in pl/sql?
What are the different ddl commands in sql?
Can we use the cursor's to create the collection in PL/SQL?