【发布时间】:2015-10-10 08:53:29
【问题描述】:
我需要将以下 C 语句转换为 SQL 查询。
if((object->num1 == 10 && object->num2 == 11) || (object->num3 == 0 && object->num4 == 1)){
//something
}
我想要类似的东西
SELECT * FROM `table` WHERE (conditions here)
提前谢谢你。
【问题讨论】:
-
TRY
SELECT * FROM 'table' WHERE (num1 =10 AND num2 =11) OR (num3 = 0 AND num4 = 1);这里 num1,num2,num3,num4 是列名。 -
where (num1, num2) = (10,11) or (num3, num4) = (0,1)