This video explains how to use comments in SQL.
The presenter demonstrates running multiple commands and how all commands will execute unless one is specifically commented out. To negate the impact of a single statement, the double hyphen (--) is used to create a single-line comment.
Additionally, SQL supports multi-line comments, which are created by placing the code between a forward slash and an asterisk (/* ... /). The example illustrates that any code between / and / is considered a comment and won't execute. If a specific line, such as "SELECT * FROM emp_function," is not commented, it will run as usual.
The presenter further explains the difference between single-line comments (denoted by --) and multi-line comments (denoted by / and */). These comment types are useful for temporarily disabling certain SQL statements or adding explanatory notes within the code. The video concludes with a reminder of the two types of comments and their syntax.
#sqltutorial #sqlcomments #codingtips #singlelinecomments #multilinecomments #sqlbasics #learnsql #databasemanagement #sqlforbeginners #programmingtips #codeoptimization