insert into select和select into

ORACLE:

1、table_new表已存在时

INSERT INTO table_new(columns) SELECT OLD.* FROM table_old OLD;

2、table_new表不存在时

CREATE TABLE table_new AS SELECT OLD.* FROM table_old OLD;

 

 

SQLSERVER:

1、table_new表已存在时

INSERT INTO table_new SELECT * FROM table_old

2、table_new表不存在时

SELECT * INTO table_new FROM table_old

posted @ 2013-11-28 14:28  探讨  阅读(174)  评论(0编辑  收藏  举报