以下建表语句正确的有( ) 2分 CREATE TABLE table_b AS SELECT * FROM table_a; CREATE TABLE table_b STORED as ORC_TRANSACTION AS SELECT * FROM table_a; CREATE TABLE table_b STORED as TEXTFILE AS SELECT * FROM table_a; CREATE TABLE table_b STORED as HOLODESK AS SELECT * FROM table_a;
时间: 2024-04-10 16:31:02 浏览: 79
一套Oracle SQL练习题及答案,有建表语句
以下表语句中正确的是:
- CREATE TABLE table_b SELECT * FROM table_a;
该语句用创建一个名为table_b的表,将表table_a中的所有数据复制到新表中。
- CREATE table_b STORED as ORC_TRANSACTION AS * FROM table_a;
该语是错误的。ORC_TRANSACTION不是有效的存储格式。
- CREATE TABLE table_b STORED as TEXTFILE AS SELECT * FROM table_a;
该语句是正确的。它创建了一个名为table_b的表,并且将表table_a中的数据以TEXTFILE格式存储到新表中。
- CREATE TABLE table_b STORED as HOLODESK AS SELECT * FROM table_a;
该语句是错误的。HOLODESK不是一个有效的存储格式。
所以,正确的建表语句有两个:
1. CREATE TABLE table_b AS SELECT * FROM table_a;
2. CREATE TABLE table_b STORED as TEXTFILE AS SELECT * FROM table_a;
阅读全文