您的主管让您修改ORDERS表中的AMOUNT列。他要求将该列配置为接受默认值250。该表包含您需要保留的数据。应执行以下哪条语句来完成此任务()A、ALTER TABLE orders CHANGE DATATYPE amount TO DEFAULT 250B、ALTER TABLE orders MODIFY(amount DEFAULT 250)C、DROP TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orde

题目

您的主管让您修改ORDERS表中的AMOUNT列。他要求将该列配置为接受默认值250。该表包含您需要保留的数据。应执行以下哪条语句来完成此任务()

  • A、ALTER TABLE orders CHANGE DATATYPE amount TO DEFAULT 250
  • B、ALTER TABLE orders MODIFY(amount DEFAULT 250)
  • C、DROP TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orders_01 PRIMARY KEY,customerid varchar2(5)REFERENCES customers(customerid),orderdate date,amount DEFAULT 250)
  • D、DELETE TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orders_01 PRIMARY KEY,customerid varchar2(5)REFERENCES customers(customerid),orderdate date,amount DEFAULT 250)

相似考题
更多“您的主管让您修改ORDERS表中的AMOUNT列。他要求将该列配置为接受默认值250。该表包含您需要保留的数据。应执行以下哪条语句来完成此任务()A、ALTER TABLE orders CHANGE DATATYPE amount TO DEFAULT 250B、ALTER TABLE orders MODIFY(amount DEFAULT 250)C、DROP TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orde”相关问题
  • 第1题:

    您需要删除“计划”表中的所有数据、该表的结构以及与该表关联的索引,应使用哪条语句?()

    • A、DROP TABLE
    • B、TRUNCATE TABLE
    • C、ALTER TABLE
    • D、DELETE TABLE

    正确答案:B

  • 第2题:

    要逻辑删除某一列且不要因重写所有表数据块而导致性能降低,您可以执行以下命令()

    • A、Alter table modify column
    • B、Alter table drop column
    • C、Alter table set unused
    • D、Drop column "columname"

    正确答案:B

  • 第3题:

    在SQL Server中,修改表中列定义的正确的SQL语句是()。

    • A、ALTER TABLE 表名 ALTER COLUMN 列名 数据类型
    • B、ALTER TABLE 表名 ALTER 列名 数据类型
    • C、ALTER TABLE MODIFY COLUMN 列名 数据类型
    • D、ALTER TABLE 表名 ADD 列名 数据类型

    正确答案:A

  • 第4题:

    订单表Orders的列OrderID的类型是小整型(smallint),根据业务的发展需要改为整型(integer),应该使用下面的哪条语句?()

    • A、ALTER COLUMN OrderID integer FROM Orders
    • B、ALTER TABLE Orders(OrderID integer)
    • C、ALTER TABLE Orders ALTER COLUMN OrderID integer
    • D、ALTER COLUMN Orders.OrderID integer

    正确答案:C

  • 第5题:

    Which statement accomplish this? ()

    • A、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
    • B、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • C、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • D、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
    • E、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
    • F、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

    正确答案:B

  • 第6题:

    You execute this command to drop the ITEM table, which has the primary key referred in the ORDERS table:SQL> DROP TABLE scott.item CASCADE CONSTRAINTS PURGE;  Which two statements are true about theeffect of the command()

    • A、No flashback is possible to bring back the ITEM table.
    • B、The ORDERS table is dropped along with the ITEM table.
    • C、The dependent referential integrity constraints in the ORDERS table are disabled.
    • D、The dependent referential integrity constraints in the ORDERS table are removed.
    • E、The table definition of the ITEM table and associated indexes are placed in the recycle bin

    正确答案:A,D

  • 第7题:

    You need to create a table named ORDERS that contain four columns: 1. an ORDER_ID column of number data type 2. aCUSTOMER_ID column of number data type 3. an ORDER_STATUS column that contains a character data type 4. aDATE_ORDERED column to contain the date the order was placed. When a row is inserted into the table, if no value is provided when the order was placed, today's date should be used instead. Which statement accomplishes this?()

    • A、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
    • B、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • C、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • D、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
    • E、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
    • F、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

    正确答案:B

  • 第8题:

    TestKing.com uses a SQL Server 2005 database. This database contains a trigger named trg InsertOrders, which fires when order data is inserted into the Orders table. The trigger is responsible for ensuring that a customer exists in the Customers table before data is inserted into the Orders table. You need to configure the trigger to prevent it from firing during the data import process. You must accomplish this goal while using the least amount of administrative effort. Which two Transact-SQL statements can you use to achieve this goal?()

    • A、ALTER TABLE OrdersDISABLE TRIGGER trg InsertOrders
    • B、DROP TRIGGER trg InsertOrders
    • C、DISABLE TRIGGER trg InsertOrders ON Orders
    • D、ALTER TRIGGER trg InsertOrders ON Orders NOT FOR REPLICATION

    正确答案:A,C

  • 第9题:

    单选题
    您的主管让您修改ORDERS表中的AMOUNT列。他要求将该列配置为接受默认值250。该表包含您需要保留的数据。应执行以下哪条语句来完成此任务()
    A

    ALTER TABLE orders CHANGE DATATYPE amount TO DEFAULT 250

    B

    ALTER TABLE orders MODIFY(amount DEFAULT 250)

    C

    DROP TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orders_01 PRIMARY KEY,customerid varchar2(5)REFERENCES customers(customerid),orderdate date,amount DEFAULT 250)

    D

    DELETE TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orders_01 PRIMARY KEY,customerid varchar2(5)REFERENCES customers(customerid),orderdate date,amount DEFAULT 250)


    正确答案: C
    解析: 暂无解析

  • 第10题:

    单选题
    View the Exhibit and examine the data in ORDERS_MASTER and MONTHLYjDRDERS tables. What would be the outcome of the above statement?()
    A

     The ORDERS_MASTER table would contain the ORDERJDs 1 and 2.

    B

     The ORDERS_MASTER table would contain the ORDERJDs 1, 2 and 3.

    C

     The ORDERS_MASTER table would contain the ORDERJDs 1, 2 and 4.

    D

     The ORDERS MASTER table would contain the ORDER IDs 1, 2, 3 and 4.


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    Which statement accomplish this? ()
    A

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);

    B

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);

    C

    CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);

    D

    CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);

    E

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);

    F

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);


    正确答案: D
    解析: 暂无解析

  • 第12题:

    多选题
    You execute this command to drop the ITEM table, which has the primary key referred in the ORDERS table:SQL> DROP TABLE scott.item CASCADE CONSTRAINTS PURGE;  Which two statements are true about theeffect of the command()
    A

    No flashback is possible to bring back the ITEM table.

    B

    The ORDERS table is dropped along with the ITEM table.

    C

    The dependent referential integrity constraints in the ORDERS table are disabled.

    D

    The dependent referential integrity constraints in the ORDERS table are removed.

    E

    The table definition of the ITEM table and associated indexes are placed in the recycle bin


    正确答案: D,B
    解析: 暂无解析

  • 第13题:

    为表TEST中ID列添加主键约束的语法是()

    • A、ALTER  TABLE  TEST  CHANGE( ID  INT  PRIMARY  KEY)
    • B、ALTER  TABLE  TEST  ADD( ID  INT  PRIMARY  KEY)
    • C、ALTER  TABLE  TEST  MODIFY( ID  INT  PRIMARY  KEY)
    • D、ALTER  TABLE  TEST  ADD  CONSTRAINT PK  PRIMARY KEY (ID)

    正确答案:D

  • 第14题:

    您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()

    • A、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)
    • B、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)
    • C、ALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)
    • D、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)

    正确答案:A

  • 第15题:

    Your company uses a SQL Server 2005 database. This database contains a trigger named trg_InsertOrders, which fires when order data is inserted into the Orders table. The trigger is responsible for ensuring that a customer exists in the Customers table before data is inserted into the Orders table. You need to configure the trigger to prevent it from firing during the data import process. You must accomplish this goal while using the least amount of administrative effort.  Which two Transact-SQL statements can you use to achieve this goal?()

    • A、 ALTER TABLE OrdersDISABLE TRIGGER trg_InsertOrders 
    • B、 DROP TRIGGER trg_InsertOrders 
    • C、 DISABLE TRIGGER trg_InsertOrders ON Orders 
    • D、 ALTER TRIGGER trg_InsertOrders  ON Orders NOT FOR REPLICATION 
    • E、 sp_settriggerorder@triggername= 'trg_InsertOrders', @order='None'

    正确答案:A,C

  • 第16题:

    您需要从方案中的雇员表中删除EMP_FK_DEPT约束条件。应使用哪条语句()

    • A、DROP CONSTRAINT EMP_FK_DEPT FROM雇员
    • B、DELETE CONSTRAINT EMP_FK_DEPT FROM雇员
    • C、ALTER TABLE雇员DROP CONSTRAINT EMP_FK_DEPT
    • D、ALTER TABLE雇员REMOVE CONSTRAINT EMP_FK_DEPT

    正确答案:C

  • 第17题:

    Examine the command that is used to create a table:  SQL> CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER(6), oamt NUMBER(10,2)) TABLESPACE users;  Which two statements are true about the effect of the above command) ()

    • A、A CHECK constraint is created on the OID column.
    • B、A NOT NULL constraint is created on the OID column.
    • C、The ORDERS table is the only object created in the USERS tablespace.
    • D、The ORDERS table and a unique index are created in the USERS tablespace.
    • E、The ORDERS table is created in the USERS tablespace and a unique index is created on the OIDcolumn in the SYSTEM tablespace.

    正确答案:B,D

  • 第18题:

    You need to create a table named ORDERS that contains four columns: 1.an ORDER_ID column of number data type 2.a CUSTOMER_ID column of number data type 3.an ORDER_STATUS column that contains a character data type 4.a DATE_ORDERED column to contain the date the order was placed When a row is inserted into the table, if no value is provided for the status of the order, the value PENDING should be used instead. Which statement accomplishes this?()

    • A、CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status NUMBER(10) DEFAULT 'PENDING', date_ordered DATE );
    • B、CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
    • C、CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
    • D、CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
    • E、CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
    • F、CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered VARCHAR2 );

    正确答案:E

  • 第19题:

    发出下列语句:alter table sales drop columm profit;何时从Oracle中实际删除列?()

    • A、执行语句后立即删除
    • B、发出alter table drop unused columns命令之后
    • C、发出alter table set unused columns命令之后
    • D、发出alter table modify命令之后

    正确答案:A

  • 第20题:

    多选题
    Examine the command that is used to create a table: SQL> CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER (6), oamtNUMBER(10,2)) TABLESPACE users; Which two statements are true about the effect of the above command()
    A

    A CHECK constraint is created on the OID column.

    B

    A NOT NULL constraint is created on the OID column.

    C

    The ORDERS table is the only object created in the USERS tablespace.

    D

    The ORDERS table and a unique index are created in the USERS tablespace.

    E

    The ORDERS table is created in the USERS tablespace and a unique index is created on the OID columnin the SYSTEM tablespace.


    正确答案: B,E
    解析: 暂无解析

  • 第21题:

    单选题
    订单表Orders的列OrderID的类型是小整型(smallint),根据业务的发展需要改为整型(integer),应该使用下面的哪条语句?()
    A

    ALTER COLUMN OrderID integer FROM Orders

    B

    ALTER TABLE Orders(OrderID integer)

    C

    ALTER TABLE Orders ALTER COLUMN OrderID integer

    D

    ALTER COLUMN Orders.OrderID integer


    正确答案: C
    解析: 暂无解析

  • 第22题:

    单选题
    You need to create a table named ORDERS that contain four columns: 1. an ORDER_ID column of number data type 2. aCUSTOMER_ID column of number data type 3. an ORDER_STATUS column that contains a character data type 4. aDATE_ORDERED column to contain the date the order was placed. When a row is inserted into the table, if no value is provided when the order was placed, today's date should be used instead. Which statement accomplishes this? ()
    A

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);

    B

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);

    C

    CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);

    D

    CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);

    E

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);

    F

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);


    正确答案: C
    解析: 暂无解析

  • 第23题:

    单选题
    You need to create a table named ORDERS that contains four columns: 1.an ORDER_ID column of number data type 2.a CUSTOMER_ID column of number data type 3.an ORDER_STATUS column that contains a character data type 4.a DATE_ORDERED column to contain the date the order was placed When a row is inserted into the table, if no value is provided for the status of the order, the value PENDING should be used instead. Which statement accomplishes this?()
    A

    CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status NUMBER(10) DEFAULT 'PENDING', date_ordered DATE );

    B

    CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );

    C

    CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );

    D

    CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );

    E

    CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );

    F

    CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered VARCHAR2 );


    正确答案: E
    解析: 暂无解析