mysql的查询相关语句

1、查询所有:select * from 表名;
2、查询表中的特定列:select 字段名 from 表名;

根据条件查询:
1、select * from 表名 where 条件;
2、select * from 表名 where 条件 and 条件;
3、select * from 表名 where 条件 or 条件;
4、select * from 表名 where lim=>30 and lim<=60 ;范围查询
5、select * from 表名 where lim between 50 and 60;范围查询

6、select * from wenzhang where name like ‘内容%’; 模糊查询
7、select 字段名 from 表名 group by 字段名 having 字段名 >数字 或者 小于;
8、select * from 表名 limit 0,2; 分页查询 limit:限制
9、select discinct 字段名 from 表名; 去重复查询

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值