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
What is %rowtype in pl sql?
how can you see all indexes defined for a table? : Sql dba
What is join view in sql?
What types of commands can be executed in sql*plus?
how to use regular expression in pattern match conditions? : Sql dba
What is the use of sqlerrd 3?
what are the differences between char and nchar? : Sql dba
Explain 3 basic parts of a trigger.
What is the use of stored procedures?
Why is the cursor important?
What is rank () in sql?
how to shutdown mysql server? : Sql dba
What are different types of keys?
How do I get sql certification?
Does sql full backup truncate logs?