你给个条件好让两条合并成一条啊。如
select a.names, b.names as typ from table1 as a ,table2 as b where a.id=b.id
select * from (
select names from table1
union all
select names from table2
)a
这样就是得到2个表的数据在同一列出现
建议直接用union all程序:
select names as typ
from table1
union all
select names
from table2
不知道你具体什么数据库,且表述不清楚,大概写下,,,
sqlserver可以
select (a.names+ b.names) as typ
from table1 as a ,table2 as b
where a.关联字段=b.关联字段