where条件里面多个值查询

where 后边跟同一条件多值查询用 “  in ()‘’

SELECT
	* 
FROM
	sys_dept 
WHERE
	id IN ( 1253175466772705281, 1352263455977005058 )

不同条件用 and

SELECT
	* 
FROM
	sys_dept 
WHERE
	id = 1352263455977005058
	AND 
	creator = 1067246875800000001

 

你可能感兴趣的:(sql,mysql)