FROM employees;
Annotation appears at the end of the command:
SELECT employee_id, last_name / * Author: quantrimang.com * /
FROM employees;
Or:
SELECT employee_id, last_name - Author: quantrimang.com
FROM employees;
Annotation is located on a single line:
SELECT employee_id, last_name
/ * Author: quantrimang.com * /
FROM employees;
In SQL Server, you can write comments and comments on multiple lines while using SQL statements. An example is as follows:
SELECT employee_id, last_name
/ *
* Author: quantrimang.com
* Purpose: Displays annotations spread across multiple lines in an SQL statement
* /
FROM employees;
The caption of the recently executed example is on the four lines of the working screen.
Or you can use this syntax:
SELECT employee_id, last_name / * Author: quantrimang.com
Purpose: Displays annotations spread across multiple lines in an SQL statement. * /
FROM employees;
Marking and commenting next to a statement by annotation makes it easy to understand and control, as well as to fix errors for your work more quickly and conveniently.
Good luck!
Previous article: Find User in SQL Server
Next lesson: LITERAL (Hang) in SQL Server