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 ...;

猜你喜欢

转载自www.cnblogs.com/wl443587/p/10176200.html