SQL '--Single line comments'

<< Click to Display Table of Contents >>

Navigation:  SQL > SQL dialog >

SQL '--Single line comments'

Previous pageReturn to chapter overviewNext page

SQL single line comments / inline comments

Though not part of the BDE Local SQL language, PdxEditor gives the option to accept SQL single line comments as available with most other database engines - except MS Access* (not allowing SQL comments at all - really!).
With PdxEditor single line comments may be used together with the standard framed comments /* comment */.
Single line comments are conveniently delimited by the dual leading dashes as in:

-- This is a single line comment

This may come handy to inactivate only single lines of a statement or of a script or within same line inline commenting, as in:

DROP TABLE Table2;

-- DROP TABLE Table3;

DROP TABLE Table4; -- some inline comment

or

SELECT *
FROM Table2
--WHERE Salary > 5000

;

or you may lift the action of standard delimiters to reactivate blocks of inactivated code, as in:

--/*
DROP TABLE Table2;

DROP TABLE Table3;

DROP TABLE Table4;
--*/

See also Mixed multi/single line comments

SQL | SQL Editor Options

As single line comments are not generically accepted by BDE/Paradox, you must select the
[Clean Up Complex Comment Markings] from the menu SQL/SQL Editor Options, if using single line (--) comments.
See also SQL script pre-processing.

*: MS Access 2002 & 2016

__________________________
PdxEditor Application Help, 18 May 2026; © 2010-2026 Niels Knabe