美文网首页
2. 增删改查语句

2. 增删改查语句

作者: A梦啊 | 来源:发表于2017-07-28 22:14 被阅读0次

#插入数据# 

>insert into msg

>(id,title,name,content)

>values

>(1,"问好","张三","初来乍到,请多指教。");

>insert into msg

>(id,title,name,content)

>values

>(1,"又来了","李四","能当老大吗?"),

>(3,"3标题","刘备","雌雄双剑"),

>(4,"4标题","关于","青龙偃月刀"),

>(5,"5标题","张飞","丈八蛇矛");

#修改数据#

>update msg

>set

>id=2,

>content="偏要当老大"

>where

>name="李四";

#删除数据#

>delete from msg

>where id=2;

#查询表格数据#

①查询整张表

>select * from msg;

②查询部分行或列

>select name,content

>from msg

>where id>2;

相关文章

网友评论

      本文标题:2. 增删改查语句

      本文链接:https://www.haomeiwen.com/subject/rroflxtx.html