表1:
Groupname View
member table a
non member table b
表a:
id key
1 A
2 B
3 C
表B:
ID KEY
1 M
2 L
3 H
4 G
5 F
最终输出:
GROUPNAME KEY
member A
member B
member C
non member M
non member L
non member H
non member G
non member F
答案 0 :(得分:0)
Select 'member' as GROUPNAME, KEY as KEY from [table a]
UNION
Select 'non member' as GROUPNAME, KEY as KEY from [table b]