To retriev the first 10 records from table in sql server with out using top key word ( duplication should not be find)
select distinct a.questionid,a.question,a.questiongroup from questions a, questions b where a.questionid>=b.questionid group by
a.questionid,a.question,a.questiongroup having count(*)<=10
select distinct a.* from table1 a, table1 b where a.id>=b.id group by a.id,a.col1,a.col2 having count(*)<=10
|
No responses found. Be the first to respond and make money from revenue sharing program.
|