[Quote=引用 2 楼 beyond_me21 的回复:]
select 表1的字段1 as 起一个相同的新字段名 from 表1 where 字段 like '%关健字%'
union all
select 表2的字段1 as 起一个相同的新字段名 from 表2 where 字段 like '%关健字%'
union all
select 表3的字段1 as 起一个相同的新字段名 from 表1 where 字段 like '%关健字%'
select 表1的字段1 as 起一个相同的新字段名 from 表1 where 字段 like '%关健字%'
union all
select 表2的字段1 as 起一个相同的新字段名 from 表2 where 字段 like '%关健字%'
union all
select 表3的字段1 as 起一个相同的新字段名 from 表1 where 字段 like '%关健字%'
[Quote=引用 9 楼 yq_py 的回复:]
引用 8 楼 lmaohuanl 的回复:
引用 2 楼 beyond_me21 的回复:
select 表1的字段1 as 起一个相同的新字段名 from 表1 where 字段 like '%关健字%'
union all
select 表2的字段1 as 起一个相同的新字段名 from 表2 where 字段 like '%关健字%'
union all
select 表3的字段……
[/Quote]
select 表1的字段1 as 起一个相同的新字段名, '表1' as '属于' from 表1 where 字段 like '%关健字%'
union all
select 表2的字段1 as 起一个相同的新字段名,'表2' as '属于' from 表2 where 字段 like '%关健字%'
union all
select 表3的字段1 as 起一个相同的新字段名,'表3' as '属于' from 表1 where 字段 like '%关健字%'