Search the Whole World Here.,.,

SQL - Comments in Statements




To ignore just a part of a statement, use the /* */ comment.
Any text between /* and */ will be ignored.

Example

Ignore part of a line:
SELECT CustomerName, /*City,*/ Country FROM Customers;
Try it Yourself »

Example

Ignore a parts of a statment:
SELECT * FROM Customers WHERE (CustomerName LIKE 'L%'
OR CustomerName LIKE 'R%' /*OR CustomerName LIKE 'S%'
OR CustomerName LIKE 'T%'*/
 OR CustomerName LIKE 'W%')
AND Country='USA'
ORDER BY CustomerName;
Try it Yourself »


EmoticonEmoticon