我想搜索2个表中的值,即使它具有相同的列值。
e.g
表1
ID 姓名
1 Jump^Eer
2 Mouse
3 M^3ou^2ses
4 NiceMo^7use
5 ^2Pa^1p^7er
6 MickyMouse
7 JerryMouse
表2
ID 姓名
1 Jumper
3 Mouses
4 NiceMouse
5 Paper
搜索价值"鼠标"
结果将是
2 Mouse
3 Mouses
4 NiceMouse
6 MickyMouse
7 JerryMouse
答案 0 :(得分:1)
select ID, [Name] from Table1 where Lower([Name]) like '%mouse%'
union
select ID, [Name] from Table2 where Lower([Name]) like '%mouse%'