Comments play a key role in any programming language to understand the script written by some other person. Comments are to give information about the script. In the same way, comments in SQL also gives information about the script.
Comments are two types
- Single line comments
- Multiline comments
Single line comments: Comments starting and ending in a single line are considered as single line comments.
The line starting with ‘-- ‘ is a comment and will not be executed.
Syntax:
--This is a single line comment
--This is another comment
SELECT * FROM Employeeinfo;
Multiline comments: Comments starting at one line and ending in another line are considered as multiline comments. The line starting with ‘/*’ is considered as the starting point of the comment and are terminated when ‘*/’ is encountered.
Syntax:/* This is a multiline comment
and it is ending in this line */
SELECT * FROM Employeeinfo;




SQL Server
C#.Net
ASP.Net
ADO.Net
jQuery
No comments:
Post a Comment