Implementing Oracle's MINUS set operator in T-SQL

  • Thread starter Thread starter DeadManWalking
  • Start date Start date
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
 
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.)
 
Back
Top