azurelunatic: Vivid pink Alaskan wild rose. (Default)
Azure Jane Lunatic (Azz) 🌺 ([personal profile] azurelunatic) wrote2008-06-14 12:43 pm
Entry tags:

Posted using TxtLJ

I became disenchanted with SQL (as found in Access) when I realized I could not comment my code.
wibbble: A manipulated picture of my eye, with a blue swirling background. (Code Eye)

[personal profile] wibbble 2008-06-14 07:58 pm (UTC)(link)
At least for MySQL, you can add comments with a '--' at the start of the line.

I've no idea about Access.
ext_5457: (Default)

[identity profile] xinef.livejournal.com 2008-06-15 02:06 am (UTC)(link)
Same for t-SQL as used in SQL Query Analyser. No idea if Access uses same syntax.

And you can add comments at the end of a line in the same way:

--this is a simple select statement
select * from database.dbo.thistable with (nolock) -- don't do this if this is a large table
ext_5457: (Default)

[identity profile] xinef.livejournal.com 2008-06-15 04:13 pm (UTC)(link)
I work with SQL all the time. Can't say I'm an expert on all matters re SQL, but certainly on some! Feel free to drop questions and I'll try to answer them for you.

[identity profile] ralmathon.livejournal.com 2008-06-16 04:16 pm (UTC)(link)
From what I remember, you can't comment the SQL itself in Access. You can comment in the code just before you call the SQL however. That takes VB knowledge though. If it's on a button click that your calling the SQL, go into the code for the button and comment there. That's the best advice I can give. Sorry.,