user_id | email_id | type
---------------------------------------
000121 | test1234 | EXT
000125 | best_21 | LOT
000128 | lite_21@ | EXT
我想使用like
Select * from tablename where Concat (emailid,'',type) LIKE 'test1234 EXT'
但此查询无效
答案 0 :(得分:2)
为什么不使用
Select * from tablename where emailid LIKE 'test1234' AND type LIKE ' EXT'
答案 1 :(得分:0)
此查询会有所帮助。
SELECT * FROM tablename WHERE
emailid + '' + type LIKE 'test1234EXT'
OR emailid LIKE 'test1234EXT'
OR type LIKE 'test1234EXT'
在SQLFiddler Fiddler
中检查