MySQLday04-数据操作

1.查询

select * from 表名

 

2.增加

全列插入:insert into 表名 values(...)

缺省插入:insert into 表名(列1,...) values(值1,...)

同时插入多条数据:insert into 表名 values(...),(...)...;

或insert into 表名(列1,...) values(值1,...),(值1,...)...;

 

3. 修改

update 表名 set 列1=值1,... where 条件

 

4. 删除

delete from 表名 where 条件

 

逻辑删除,本质就是修改操作update

update students isdelete=1 where ...;

 

posted @ 2018-12-25 20:12  炫风真是风  阅读(112)  评论(0编辑  收藏  举报