假设我们需要执行类似这样的请求,它
在哪里с1and table1.с1, and table2.с1:
SELECT DISTINCT(c1) FROM table1, table2
是否可以在 SQL 查询中垂直连接数据库表,
以便将相应的列视为单个列[1, 1, 2, 2]?
table1 table2 result
c1 c2 c3 + c1 c2 c3 = c1 c2 c3
1 1 1 2 2 2 1 1 1
1 1 1 2 2 2 1 1 1
2 2 2
2 2 2
使用UNION操作: