| Home | Previous Lesson: Query Plan Next Lesson: Painting the SQL Statement |
You can comment the SQL code in any one of the following styles.
Double Slash Method: '//' without quotations make everything after that in that line is considered as a comment. If you place it in the middle of a line, everything after that will be treated as comments.
//The following select everything from units table.
Select * from units;
Double Minus Method: You can even use double minus instead of dobule slash. Both work exactly same.
--The following select everything from units table.
Select * from units;
Slash-Star & Star-Slash Method: Sometimes, you might want to comment multiple lines. In that case, place /* at the beginning of comments and end the comments with */, everything in between is treated as comments. You can even use this method to comment a single line or a portion or it.
/* The following select everything from units table. */
Select * /* meaning unit, unit_description */ from units;
| Home | Previous Lesson: Query Plan Next Lesson: Painting the SQL Statement |