SQL> desc big_test;
名称 是否为空? 类型
----------------------------------------- -------- --------------------------
OWNER NOT NULL VARCHAR2(30)
OBJECT_NAME NOT NULL VARCHAR2(30)
SUBOBJECT_NAME VARCHAR2(30)
OBJECT_ID NOT NULL NUMBER
DATA_OBJECT_ID NUMBER
OBJECT_TYPE VARCHAR2(19)
CREATED NOT NULL DATE
LAST_DDL_TIME NOT NULL DATE
TIMESTAMP VARCHAR2(19)
STATUS VARCHAR2(7)
TEMPORARY VARCHAR2(1)
GENERATED VARCHAR2(1)
SECONDARY VARCHAR2(1)
NAMESPACE NOT NULL NUMBER
EDITION_NAME VARCHAR2(30)
SQL> select count(*) from big_test;
COUNT(*)
----------
71651
SQL>
那在sqlserver中,我们创建一个备份表 ,怎么做呢,
--我们看到sqlserver中,没有类似的create table as 这种语法
---
1> create table big_test as select * from sys.all_objects;
2> go
消息 156,级别 15,状态 1,服务器 RAC1,第 1 行
关键字 'as' 附近有语法错误。
1>
2>
--- 解决办法,是使用into new_table的方式来解决
3> select * into big_test from sys.all_objects;
4> go
(2006 行受影响)
1> select count(*) from big_test;
2> go
-----------
2006
(1 行受影响)
1>