Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何通过仅复制多个表中的列来创建表?
例如。t1 与字段 (A1,A2,A3) t2 with fiedls (D1,D2,D3) t3 with fields (Z1,Z2,Z3)
例如。t1 与字段 (A1,A2,A3)
t2 with fiedls (D1,D2,D3) t3 with fields (Z1,Z2,Z3)
现在我必须只使用字段而不是上述三个表中的值来创建一个新表,即
new_tbl (A1,A2,A3,D1,D2,D3,Z1,Z2,Z3)
我该怎么做??
试试这个:
create table new_tbl as select * from t1 join t1 on 1=2 join t3 on 1=2
条件 1=2 始终为假.. 所以它不会返回任何数据,但列标题..