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 / jayakrishnan
select count(case gender when 'male' then 1 end) Male,
count(case gender when 'female' then 1 end) Female from emp1
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Why are indexes and views important to an organization?
When is the update_statistics command used?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
How do I enable sql encryption?
What is the usage of when clause in trigger?
What is primary key secondary key alternate key candidate key?
What is relationship? How many types of relationship are there?
what is normalization? : Sql dba
How do I remove all records from a table?
what is sql? : Sql dba
What is bitemporal narrowing?
What are the steps for performance tuning.
Do foreign keys improve performance?
How does one use sql*loader to load images, sound clips and documents? : aql loader
what are the advantages and disadvantages of views in a database? : Sql dba