mysql中where条件怎么写

2025-03-27 09:16:36
推荐回答(2个)
回答1:

例子:
select * from user where id=1
查询id为一的用户
select * from user where name like '章%'
查询姓张的用户
select * from user where age in (12,13,14) and sex='男'
查询年龄是12,13,14的男生用户
。。。。

回答2:

比如查询student表里面id等于23的数据:
select * from student where id = 23
这样子写