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 to call a function from a stored procedure in SQL Server ?
What is a schema in ms sql server 2005?
Explain trigger and its types?
What are different types of table joins?
Is sql server 2016 free?
What do you understand by mirroring and mention the advantages of the mirroring?
What are the rules to use the rowguidcol property to define a globally unique identifier column?
What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.
How do I setup a sql server database?
Is oracle faster than sql server?
Explain what is use of dbcc commands?
What are cursors and when they are useful?
Explain foreign key in sql server?
Explain the truncate command?
What is a field name?