mql语句中的增删改查

insert into 表名(列名1,列名2…) values(值1,值2…);

delete from 表名 where 条件表达式

update 表名 set 列名=新值1,列名=新值2 where 条件表达式

查询

  • 查询全部

select * from 表名

  • 查询某一行所有信息

select 列名 from 表名

  • 按条件查询

select * from 表名 where 条件表达式1 and 条件表达式2

模糊查询:
  • 查询带有val的数据

select * from 表名 where 列名 like “%val%”

  • 查询以val开头的数据

select * from 表名 where 列名 like “val%”

  • 查询以val结尾的数据

select * from 表名 where 列名 like “%val”

猜你喜欢

转载自blog.csdn.net/qq_43201542/article/details/84932283