请教这个sql查询like语句怎么写我要查询姓王

如题所述

用以“王”字开头做like模糊查询就可以了。例如:
select * from students where sName like '王%';
请留意不同的数据库所使用的通配符是不一样的,例如access数据库默认语法上述语句要改为如下:
select * from students where sName like '王*';
温馨提示:答案为网友推荐,仅供参考
相似回答