mysql注释方法【自用】

时间:2023-03-09 00:23:36
mysql注释方法【自用】

原文链接:https://www.jb51.net/article/125991.htm

一、MySQL支持三种注释方式:

1.从‘#'字符从行尾。

mysql注释方法【自用】

2.从‘-- '序列到行尾。请注意‘-- '(双破折号)注释风格要求第2个破折号后面至少跟一个空格符(例如空格、tab、换行符等等)

mysql注释方法【自用】

3.从/*序列到后面的*/序列。结束序列不一定在同一行中,因此该语法允许注释跨越多行。

mysql注释方法【自用】

二、SQL语句(delete与truncate的区别 链接:https://blog.****.net/helloboat/article/details/51481913

#use sqltest
/*create table people(
id int not null PRIMARY key,
name varchar(50),
age int
);*/ #insert into people values(2,"大红花",45)
#select * from people #where id=2
#update people set name="娃哈哈" where id=2
#delete from people where id=1 #delete from people
#truncate people
#drop table people