how to select 5 to 7 rows from a table, which contains 10 rows?
Answer Posted / purabi roy(sarkar)
select top 3* from Tablename
where columnname in ( select top 7columnname from table
name order by columnname desc )
and columnname not in( select top 4columnname from
tablename order by columnname desc )
order by columnname desc
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How do I clean up sql server transaction log?
What are the benefits and tasks of object explorer? : sql server management studio
What is the command used to check locks in microsoft sql server?
Do you know what is difference between index seek vs. Index scan?
You want to generate a report that is formatted as a chart. Can you use the report wizard to create such a report?
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
Why you need indexing? Where that is stored and what you mean by schema object? For what purpose we are using view?
Write the syntax for stuff function in an sql server?
What is sqlservr.exe - process - sql server (sqlex?press)?
What happens to a trigger with multiple affected rows?
What is user defined datatypes and when you should go for them?
What is the use of sign function?
How to set database to be single_user in ms sql server?
what is the main function of a query parameter?
Is ssrs support other database except ms sql server?