SQL单行注释和多行注释

MySQL

单行注释

1.使用"#"

#单行注释
select * from students;

2.使用 "-- " 注意,--后跟有一个空格

-- MySQL单行注释方法二
select * from students

多行注释: 使用/* */

/*
此处为注释....
*/
select * from students;

Oracle

单行注释:-- 例如

--单行注释
SELECT * FROM talbe;

多行注释: /* */ 例如:

/*
此处
为多行注释内容
*/
SELECT * FROM table;

猜你喜欢

转载自blog.csdn.net/nianbingsihan/article/details/80903778