99问答网
所有问题
请教这个sql查询like语句怎么写我要查询姓王
如题所述
举报该问题
推荐答案 2017-12-08
用以“王”字开头做like模糊查询就可以了。例如:
select * from students where sName like '王%';
请留意不同的数据库所使用的通配符是不一样的,例如access数据库默认语法上述语句要改为如下:
select * from students where sName like '王*';
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://99.wendadaohang.com/zd/vvXvzzWOtXj7jX7zvvO.html
相似回答
大家正在搜
相关问题
SQL语句,不用模糊查询,我想查询姓王的人,怎么写?
SQL语句like '%王'表示查询数据姓王的,但若是查询不...
用sql语言描述“在教师表中查找姓王的老师”
数据库里,统计所有姓王和姓李的学生人数。代码
oracle 中查询scott表中姓名中为姓王的所有SQL语...
SQL:查询出姓王且所有功课都及格的学生信息(子查询)
写出SQL语句,查找班级为"3.7班",姓王的学生的名单
access建立查询,查找姓名为两个字的姓“王”的人。