#插入数据#
①
>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;
网友评论