Comments are text written by developers to leave an explanation in the code. Comments are ignored by the database. DB2 supports two types of comments:
/* */ --
Example
-- this is a comment select * from employee; select * from employer; /* another comment */
Both SQL commands run with an error. Note that /* and */ have to end on the same line. They cannot span multiple lines. Noe that the following would produce an error message:
select * from employee; -- this is a comment
-- can only works if -- it the first non-space character.