Comments - DotNet and DataBase

Saturday, 11 August 2018

Comments



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

  1. Single line comments
  2. 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;

No comments:

Post a Comment

x

Get Updates On

Discussion updates

Straight Into Your INBOX!

Enter your email address to subscribe to this website and receive notifications of new posts by email.