这些示例说明了使用 SQL 注释指示符的不同方式。
SELECT * FROM customer; -- Selects all columns and rows SELECT * FROM customer; {Selects all columns and rows} SELECT * FROM customer; /*Selects all columns and rows*/
SELECT * FROM customer; -- Selects all columns and rows SELECT * FROM customer; {Selects all columns and rows} SELECT * FROM customer; /*Selects all columns and rows*/
SELECT * FROM customer; -- Selects all columns and rows -- from the customer table SELECT * FROM customer; {Selects all columns and rows from the customer table} SELECT * FROM customer; /*Selects all columns and rows from the customer table*/
SELECT * -- Selects all columns and rows FROM customer; -- from the customer table SELECT * {Selects all columns and rows} FROM customer; {from the customer table} SELECT * /*Selects all columns and rows*/ FROM customer; /*from the customer table*/如果您使用花括号或 C 语言样式的注释被成对的开始和结束符号定界,那么结束注释符号必须与开始注释符号的样式相同。