【发布时间】:2015-06-29 16:55:32
【问题描述】:
我试图创建一个表custom_table
产品没有价格栏,pc和笔记本电脑都没有类型栏。
所以我需要知道在这种情况下如何使用 with 子句创建表?
这是我的查询
with custom_table(model,type,price)
as
(select model,type from product
union
select model,price from pc
union
select model,price from laptop)
select * from custom_table
【问题讨论】: