首页 > 数据库技术 > 详细

sql指令,增,删,查,改

时间:2021-04-28 22:03:15      阅读:26      评论:0      收藏:0      [点我收藏+]

 

insert into table (name,sex,age) value(‘张三‘,‘男’,‘20’)   向表中的name,sex,age,分别添加张三,男,20的内容

select   “要查找的东西” from  "从哪一个表查"        *代表所有

select    name where table where name=‘肖淇‘   在表中查询名字为肖淇的内容

delete   from table   where name=‘肖淇‘  在表中删除名字为肖淇的内容

delete  from table 删除整个表中的内容

update   table name=‘张三‘ where name=‘肖淇‘    将表中名字为肖淇的内容改为张三

 

 

拓展:

排序

select * from table order by age   查询表中所有信息,并按年级升序排序

select * from table order by age  desc  查询表中所有信息,并按年级降序排序

 

返回唯一不同的值

 

sql指令,增,删,查,改

原文:https://www.cnblogs.com/xiaopo/p/14715495.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!