Click here to Skip to main content
15,912,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want a single sql query for getting 3,8,12 no of records data from a table.
Posted
Updated 10-Jan-11 23:47pm
v2
Comments
Dalek Dave 11-Jan-11 6:11am    
Edited for Syntax.

1 solution

I assume you mean "I want to read records with a id of 3, 8 and 12 from an SQL table:
SELECT * FROM myTable WHERE Sno IN (3, 6, 12)
Should do the job.
 
Share this answer
 
Comments
Dalek Dave 11-Jan-11 6:11am    
Good Answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900