OCP-1Z0-051-V9.02-1题

该博客讨论了Oracle OCP考试中的一个问题,涉及CREATE TABLE AS SELECT语句的使用。内容指出,在创建NEW_SALES表时,即使在列定义中指定了DEFAULT SYSDATE,表仍然可以成功创建,并且源表上的NOT NULL约束将传递到新表,但FOREIGN KEY约束不会。
摘要由CSDN通过智能技术生成

1. View the Exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS, and TIMES

tables.

The PROD_ID column is the foreign key in the SALES table, which references the PRODUCTS table.

Similarly, the CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the

CUSTOMERS and TIMES tables, respectively.

Evaluate the following CREATE TABLE command:

CREATE TABLE new_sales(prod_id, cust_id, order_date DEFAULT SYSDATE)

AS

SELECT prod_id, cust_id, time_id

FROM sales;

Which statement is true regarding the above command? 

 

A. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the

column definition.

B. The NEW_SALES table would get created and all the NOT NULL constraints defined on the specified </

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值