I HAVE TABLE LIKE THIS.............
SNO NAME AGE GENDER
1 RAMU 19 MALE
2 PRAVEEN 25 MALE
3 AKILA 18 FEMALE
4 RAJU 29 MALE
5 PRAVEEN 34 MALE
6 ROJA 22 FEMALE
I WANT O/P LIKE BELOW
select onle age between 18 to 25 males only......
ex;-
sno name age gender
1 RAMU 19 MALE
2 PRAVEEN 25 MALE
Loading

dinesh vasamshetty22 reputationPosted Feb 21, 2014, 7:07 PM EST
select *from tablename where gender='MALE' and age between 19 and 25;
JAYRAMRank #7,836 · 233 reputationPosted Feb 22, 2014, 1:50 AM EST
in above table compare two coloums only....k
but how to compare 3 coloums ....
like
name age gender ???????????????????????????
VulpesRank #55 · 29.2K reputationPosted Feb 22, 2014, 2:02 AM EST
select * from tablename where name like 'R%' and gender='MALE' and age between 19 and 25;
Sanjay Dholakiya82 reputationPosted Feb 26, 2014, 6:18 PM EST
Try this.
Select * from YourTableName Where (Age >18 and Age < 26) And Gender = 'Male'
or
Select * from YourTableName Where (Age between 18 and 26) And Gender = 'Male'
- Sanjay Dholakiya