How do I comment SQL code out in Microsoft Access?
As MathewMartin said, you can't. I use the following workaround:
SELECT * FROM x
WHERE "-- your comment. This plain string is always true";
or
SELECT * FROM x
WHERE y = 'something'
AND " -- z = 'something else' ";
No. You cannot have any extraneous text in Microsoft Access (JET-SQL).
You can make some constraints ignored, e.g.,
Where
name = "joe"
OR
(state = "VA" AND 1=0)
But that technique is a rather limited way to hide existing SQL.