where user in('2729-1111','CN-4848-1111','CN-1342-1511','CN-5829-1511','CN-5982-1712','CN-0422-2812','CN-5725-0311','CN-0048-0812','CN-0028-2311 ')
括号内有居多的数据,起码上万串字符
除了in有没有 其他好的写法,
提示 不能用循环了 !
括号内有居多的数据,起码上万串字符
除了in有没有 其他好的写法,
提示 不能用循环了 !
比如 '2729-1111','CN-4848-1111','CN-1342-1511'转变成
A表col字段
col
'2729-1111'
'CN-4848-1111'
'CN-1342-1511'之后执行如下查询select b.*
from 源表 b join A on b.user=A.col在b表的user上 和A表的col加上索引