mysql寫註釋的幾種方法
阿新 • • 發佈:2018-10-06
一個 之間 技術 bar tool gif title mys 多行
MySQL的註釋風格總的來說有三種、它們分別是
1、單行註釋可以用"#"
select 1 as cname; #this is a comment +-------+ | cname | +-------+ | 1 | +-------+ -- (#後面直接根的就是註釋)
2、單行註釋的第二種寫法用 "-- " 註意這個風格下"--【空格】" 也就是說“--" 與註釋之間是有空格的。
select 123; -- this is a comment +-----+ | 123 | +-----+ | 123 | +-----+ -- 註意啊-- 後面是要有一個空格的
3、多行註釋可以用/**/
mysql> select 123; /* this is a comment */ +-----+ | 123 | +-----+ | 123 | +-----+ 1 row in set (0.00 sec) mysql> select 1+ /* this is a comment */ 1; +-------+ | 1+ 1 | +-------+ | 2 | +-------+ 1 row in set (0.00 sec)
---
mysql寫註釋的幾種方法