-1
我需要知道我们是否可以从表中获取id,如果给定值位于另外两个不同列的另外两个值之间。需要Mysql查询帮助
e.g如果值是14,我需要ID 21从给定的两列
列名的表:cpd_start
cpd_end。
值= 14
id || col || value
-------------------------------------
21 || cpd_start || 10
21 || cpd_end || 20
感谢
是的,你可以。你有什么尝试? – Devon
尝试从Table_Name中选择ID,其中值> = 14且值<= 14'' –
我尝试过使用“之间”但失败 – dennis