mysql注释方法【自用】

こ雲淡風輕ζ 提交于 2020-02-13 14:06:13

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

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

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

 

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

 

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

二、SQL语句(delete与truncate的区别 链接:https://blog.csdn.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

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!