question

Mrs_Fatherjack avatar image
Mrs_Fatherjack asked

SQL 2000 With Statement

Hi Can you please let me know if the With Statement was available in SQL 2000. Many thanks
sqlsql-server-2000
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Fatherjack avatar image
Fatherjack answered
I think WITH was a reserved word in TSQL for SQL 2000 but not in the context of a CTE (Common Table Expression) which is where it is probably most commonly used from 2005 onwards. SQL 2000 Books OnLine is your friend - [ http://msdn.microsoft.com/en-us/library/aa299742(v=SQL.80).aspx][1] [1]: http://msdn.microsoft.com/en-us/library/aa299742(v=SQL.80).aspx
4 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Many thanks, I couldn't find it on BOL.
0 Likes 0 ·
The specific page for Reserved Keywords in SQL 2000 is Except the Comments box has been upgraded and you won't be able to click on the link, and I can't put in the HTML that'll take you there. *sigh*
0 Likes 0 ·
WITH was used for evil things like "WITH (NOLOCK)" (still can be too).
0 Likes 0 ·
Adding to @williamD comment - used with Query Hints, table hints, index options, DBCC options etc
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.