Search the Whole World Here.,.,

SQL - Single Line Comments




Single line comments start with --.
Any line between -- and the end of the line will be ignored (will not be executed).

Example

A single-line comment as an explanation:
--Select all:SELECT * FROM Customers;
Try it Yourself »

Example

A single-line comment to ignore the end of a line:
SELECT * FROM Customers -- WHERE City='Berlin';
Try it Yourself »

Example

A single-line comment to ignore a statement:
--SELECT * FROM Customers;SELECT * FROM Products;
Try it Yourself »


EmoticonEmoticon