Implementing Oracle's MINUS set operator in T-SQL

D

DeadManWalking

Hi,
Does T-SQL provide an operator that similar to minus in Oracle?
Or What is the sytax to retrive the result set between the 5th record to
10th record?
For example: select top 5 to 10?
Thanks
 
6

'69 Camaro

Hi.
Does T-SQL provide an operator that similar to minus in Oracle?

No. Very few DBMS's support the MINUS operator. Oracle does because it's
been around for so long. T-SQL (and SQL Server) are relatively young in the
database market.
Or What is the sytax to retrive the result set between the 5th record to
10th record?
For example: select top 5 to 10?

To display the 5th through the 10th top "Scores," try the following syntax:

SELECT Score
FROM (SELECT TOP 6 Score
FROM (SELECT TOP 10 Score
FROM tblTournaments
ORDER BY Score DESC)
ORDER BY Score)
ORDER BY Score DESC;


HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top