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
Which is faster union or join?
What is a unique key?
what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure
What are the different datatypes available in PL/SQL?
What is ttitle and btitle?
What are the ways on commenting in a pl/sql code?
Can I join the same table twice?
How many joins can you have in sql?
What is trigger and types?
What is sqlcontext?
Does truncate table reset auto increment?
What is sql*loader and what is it used for?
how to include character strings in sql statements? : Sql dba
what are the advantages and disadvantages of cascading style sheets? : Sql dba
What are tuples in sql?