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 the difference between truncate and drop statements? : Sql dba

1140


What is recursive stored procedure?

1107


define join and explain different type of joins? : Sql dba

958


Can we use view in stored procedure?

910


Why use triggers in sql?

963


What is the basic structure of an sql?

1115


Differentiate between % rowtype and type record.

1316


What is the difference between count 1 and count (*) in a sql query?

1004


Does group by remove duplicates?

1048


What are all the different normalization?

1050


Can function return multiple values in sql?

1066


how mysql optimizes distinct? : Sql dba

1087


What is nvl?

1071


Who developed sql?

1056


What is dcl in sql?

969