Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I add Notes to Procedures in SQL?

Status
Not open for further replies.

Kumba1

Technical User
Aug 29, 2002
94
Is it possible to add notes to the Queries in SQL, similar to how in VB you can pre-fix notes with a ' and they will be ignored by the parser... I'm trying to write down what each query does in my database so I dont hafta rely on a text-file on my desktop to remind me (incase I loose my computer)... Thanks :)
 
If you are using Stored Procedures to execute the SQL then you can put comments using "--" before the commment.

I haven't been able to get this to work using Views

HTH
Mike

[penguin] Dooobie...Doobie......Dooo
 
Both should work.

-- this is a comment
Declare var1 int -- this is a comment

/* this is a comment */
Declare var1 int /* this is a comment */
 
Kewl :) Now I can let SQL remember what the query does for me... LOL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top