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 the difference between null value, zero, and blank space?
How many sql databases can you have on one server?
Which command is used to call a stored procedure?
Explain raise_application_error.
What is the size of partition table?
What is a variable in sql?
What is the cause of mutating table error and how can we solve it?
how to show all tables with 'mysql'? : Sql dba
What do you understand by pl/sql packages?
What is sqlcommand?
How do you add a column to a table?
Will truncate release space?
Is sql a backend language?
Can we use rowid as primary key?
What is Histogram?