March 14, 2013 at 4:17 am
id mark
1 50
1 60
1 70
2 50
2 60
3 50
4 50
5 50
5 60
3 50 this is my table.
i need outout this
id mark
3 50
4 50
March 14, 2013 at 4:55 am
What about rules?
Why not
1 50
and
5 50
?
March 14, 2013 at 4:55 am
One answer is
SELECT DISTINCT
id ,
mark
FROM
mytable
WHERE
id IN ( 3, 4 )
but this is a guess.
Why are those records being selected? Is it based on the ID, the mark? or some other reason?
What I have supplied gives you the answer you want but it might be for the wrong reasons.
-------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
March 14, 2013 at 4:56 am
Hi, and welcome to SQL Server Central.
Please post and tell us how far you've got with your code & we'll try to help.
We could guess but your requirements aren't quite clear enough at the moment.
Regards
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply