Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is relationship? How many types of relationship are there?

1261


How can I get the number of records affected by a stored procedure?

1118


What does the sign mean in sql?

1047


What is full join in sql?

1033


What is compilation error in pl sql?

1023


What mean sql?

1052


What are the possible values that can be stored in a boolean data field?

1040


what is a primary key? : Sql dba

1086


Is natural join and inner join same?

991


how is exception handling handled in mysql? : Sql dba

1127


What is parallel hint?

1412


what is the difference between union and union all? : Sql dba

1068


What is package in pl sql?

1080


How can you select unique records from a table?

1145


What do you mean by dbms? What are its different types?

1060