create table table_name as select * from table2 where 1=2
jiezhi(西域浪子)兄的回答有一些问题,他可能理解偏了。 这样: create table table_dict as select * from dba_tab_columns where owner='your_user_name' and table_name='Your_table_name'
谢谢jiezhi; 再帮个忙: 表a,表b, 在表a的后面附上表b的全部字段,SQL又该如何写?
老大,你太贪心了好像没有这样的sql语句你可以desc b 得到b的字段,再手工加(alter table )
sql server中有这样的语句,所以就想问问oracle中是否也能这样操作。
create table c as select * from a,b where 1=2; (如果有重复列名会出错)
select * from table2 where 1=2
这样:
create table table_dict
as
select * from dba_tab_columns
where owner='your_user_name'
and table_name='Your_table_name'
再帮个忙:
表a,表b,
在表a的后面附上表b的全部字段,SQL又该如何写?
得到b的字段,再手工加(alter table )
(如果有重复列名会出错)