COMPUTER SCIENCE AND ENGINEERING
SQL
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
/* This is a comment. */
|
|
# This is a comment.
|
|
% This is a comment. %
|
|
& This is a comment.
|
Detailed explanation-1: -You can include a comment in a statement in two ways: Begin the comment with a slash and an asterisk (/*). Proceed with the text of the comment. This text can span multiple lines.
Detailed explanation-2: -Comments can be inserted on a separate line or within a Transact-SQL statement. Multiple-line comments must be indicated by /* and */. A stylistic convention often used for multiple-line comments is to begin the first line with /*, subsequent lines with **, and end with */. There is no maximum length for comments.
Detailed explanation-3: -Multi-line comments start with /* and end with */ . Any text between /* and */ will be ignored.
Detailed explanation-4: -There are two types of SQL comments: simple comments. Simple comments are introduced by two consecutive hyphens (–) and end with the end of line. bracketed comments.
Detailed explanation-5: —(Comment) (Transact-SQL) Indicates user-provided text. Comments can be inserted on a separate line, nested at the end of a Transact-SQL command line, or within a Transact-SQL statement. The server does not evaluate the comment.