我想为多个LIKE
条件指定相同的转义字符。哪个是对的?
SELECT * FROM [table] WHERE [column1] LIKE 'value1!%' AND [column2] LIKE 'value2!%' ESCAPE '!'
SELECT * FROM [table] WHERE [column1] LIKE 'value1!%' ESCAPE '!' AND [column2] LIKE 'value2!%' ESCAPE '!'
SELECT * FROM [table] WHERE [column1] LIKE 'value1!%' ESCAPE '!' AND [column2] LIKE 'value2!%'
还是别的什么呢?
答案 0 :(得分:1)
你的第二项是正确的:
SELECT * FROM [table] WHERE [column1] LIKE 'value1!%' ESCAPE '!' AND [column2] LIKE 'value2!%' ESCAPE '!'