首页 > 数据库技术 > 详细

sql查询语句

时间:2021-04-12 18:11:28      阅读:27      评论:0      收藏:0      [点我收藏+]

select * from 表名;  查询该表下所有数据

 

select * from 表名 where 条件;  查询满足某条件的数据 

select * from tb_user where id>2;

 

模糊查询 like (_(占位符)、%(通配符))

select * from tb_user where name like "张%";  查找所有姓张的

select * from tb_user where name like "_张%";  查找第二个带张的

 

in查询

select * from tb_user where id in (1,2,3);    查找id为1、2、3的数据,相当于id=1 and id=2 and id=3

 

 

sql查询语句

原文:https://www.cnblogs.com/hepeng-web/p/14648924.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!