单选题Which of the following can be used to ensure that once a row has been inserted in table TABLEX, the column MAINID in that row cannot be updated?()A Define the column MAINID as NOT UPDATABLEB Define the column MAINID as a PRIMARY KEYC Define the column

题目
单选题
Which of the following can be used to ensure that once a row has been inserted in table TABLEX, the column MAINID in that row cannot be updated?()
A

Define the column MAINID as NOT UPDATABLE

B

Define the column MAINID as a PRIMARY KEY

C

Define the column MAINID as a FOREIGN KEY

D

Define an UPDATE trigger on table TABLEX

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?()

A.Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.

B.Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).

C.Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.

D.Define column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.


参考答案:C

第2题:

What type of constraint can be used to ensure that, in any given row in a table, the value of one column never exceeds the value of another column?()

A.Check

B.Range

C.Referential

D.Informational


参考答案:A

第3题:

Examine the data in the EMPLOYEES table.On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.Evaluate this DELETE statement:Why does the DELETE statement fail when you execute it?()

A. There is no row with dept_id 90 in the EMPLOYEES table.

B. You cannot delete the JOB_ID column because it is a NOT NULL column.

C. You cannot specify column names in the DELETE clause of the DELETE statement.

D. You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.


参考答案:C

第4题:

You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named named Dworks in the instance. The Dworks table has a table named BillDetails which has a clustered primary key named BillId on the BillId column. The BillDetails table has a single XML column named GoodsDetails. The XML column has an XML index and XML data are stored in this XML column. A new column named GoodsID is added to the BillDetails table. GoodsID must be included in the primary key.  So what action should you perform to achieve this goal?()  

  • A、You should drop the XML index on the table. Modify the primary key. Recreate the XML index 
  • B、You should alter the XML index and set the ALLOW_ROW_LOCKS = OFF option. Alter the primary key and set the ALLOW_ROW_LOCKS = ON option. 
  • C、You should move the XML data to a temporary table. Clear the XML data from the original table by setting the GoodsDetails column to NULL. Modify the primary key. Repopulate the ProductSpecs column. 
  • D、You should disable the XML index on the GoodsDetails column. Modify the primary key.Enable the XML index on the ProductSpecs column.

正确答案:A

第5题:

What type of constraint can be used to ensure that, in any given row in a table, the value of one column never exceeds the value of another column?()

  • A、Check
  • B、Range
  • C、Referential
  • D、Informational

正确答案:A

第6题:

Which of the following can be used to ensure that once a row has been inserted in table TABLEX, the column MAINID in that row cannot be updated?()

A.Define the column MAINID as NOT UPDATABLE

B.Define the column MAINID as a PRIMARY KEY

C.Define the column MAINID as a FOREIGN KEY

D.Define an UPDATE trigger on table TABLEX


参考答案:D

第7题:

Click the Exhibit button and examine the data in the EMPLOYEES table.On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.Evaluate this DELETE statement:DELETE employee_id, salary, job_idFROM employeesWHERE dept_id = 90;Why does the DELETE statement fail when you execute it?()

A.There is no row with dept_id 90 in the EMPLOYEES table.

B.You cannot delete the JOB_ID column because it is a NOT NULL column.

C.You cannot specify column names in the DELETE clause of the DELETE statement.

D.You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.


参考答案:C

第8题:

What type of constraint is used to ensure that each row inserted into the EMPLOYEE table with a value in the WORKDEPT column has a row with a corresponding value in the DEPTNO column of the DEPARTMENT table?()

A.A check constraint on the EMPLOYEE table

B.A unique constraint on the EMPLOYEE table WORKDEPT column

C.A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE table

D.A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table


参考答案:D

第9题:

Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?()

  • A、Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.
  • B、Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).
  • C、Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.
  • D、Define column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.

正确答案:C

第10题:

What type of constraint is used to ensure that each row inserted into the EMPLOYEE table with a value in the WORKDEPT column has a row with a corresponding value in the DEPTNO column of the DEPARTMENT table?()

  • A、A check constraint on the EMPLOYEE table
  • B、A unique constraint on the EMPLOYEE table WORKDEPT column
  • C、A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE table
  • D、A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

正确答案:D

更多相关问题