Embedded comments

<< Click to Display Table of Contents >>

Navigation:  Local SQL > Overview > Conventions >

Embedded comments

Previous pageReturn to chapter overviewNext page

 

Comments, or remarks, can be embedded in SQL statements to add clarity or explanation. Text is designated as a comment and not treated as SQL by enclosing it within the beginning /* and ending */ comment symbols. The symbols and comments need not be on the same line.

/*

 This is a comment

*/

SELECT SUBSTRING(Company FROM 1 FOR 1) AS sub, "Text" AS word

FROM Customer

Comments can also be embedded within an SQL statement. This is useful when debugging an SQL statement, such as removing one clause for testing.

SELECT Company

FROM Customer

/* WHERE (State = "TX") */

ORDER BY Company