单选题Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()AALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;BALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;CALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;DALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;EALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;FALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;

单选题
Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()
A

ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;

B

ALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;

C

ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;

D

ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;

E

ALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;

F

ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;


参考解析

解析: 暂无解析

相关考题:

在SQL Server 2000中,设有职工表(职工号, 职工名, 电子邮箱),现要限制电子邮箱的最后几位的取值为“@abc.com”,且“@”前至少有一位字符。下列添加约束的语句正确的是A.ALTER TABLE职工表 ADD CONSTRAINT chk_email CHECK(电子邮箱LIKE '_%@abc.com')B.ALTER TABLE职工表 ADD CONSTRAINT chk_email CHECK(电子邮箱 = '_%@abc.com')C.ALTER TABLE职工表 ADD CONSTRAINT chk_email CHECK(电子邮箱LIKE '_@abc.com')D.ALTER TABLE职工表 ADD CONSTRAINT chk_email CHECK(电子邮箱 = '_@abc.com')

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?() A. ALTER TABLE students ADD PRIMARY KEY _ id;B. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);C. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;D. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);E. ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

Which statement explicitly names a constraint? () A. ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students (student_id);B. ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);C. ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);D. ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);E. ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);

Which syntax turns an existing constraint on? () A. ALTER TABLE table_name ENABLE constraint_name;B. ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint _ name;C. ALTER TABLE table_name ENABLE CONSTRAINT constraint _ name;D. ALTER TABLE table_name TURN ON CONSTRAINT constraint _ name;

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 tableB.A unique constraint on the EMPLOYEE table WORKDEPT columnC.A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE tableD.A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

为表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)

要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()A、ALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)B、ALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)C、ALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)D、ALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)

删除PRIMARYKEY约束条件及其所有依赖约束条件的语法是什么()A、ALTER TABLE table_name DROP CONSTRAINT constraint_name CASCADEB、ALTER TABLE table_name DROP CONSTRAINT FOREIGN KEY CASCADEC、DROP CONSTRAINT table_name(constraint_name)D、ALTER TABLE table_name DROP CONSTRAINT constraint_name

Which syntax turns an existing constraint on?()A、ALTER TABLE table_name ENABLE constraint_name;B、ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint_name;C、ALTER TABLE table_name ENABLE CONSTRAINT constraint_name;D、ALTER TABLE table_name STATUS ENABLE CONSTRAINT constraint_name;E、ALTER TABLE table_name TURN ON CONSTRAINT constraint_name;

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 tableB、A unique constraint on the EMPLOYEE table WORKDEPT columnC、A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE tableD、A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

Which syntax turns an existing constraint on?()A、ALTER TABLE table_name ENABLE constraint_name;B、ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint _ name;C、ALTER TABLE table_name ENABLE CONSTRAINT constraint _ name;D、ALTER TABLE table_name TURN ON CONSTRAINT constraint _ name;

Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()A、ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;B、ALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;C、ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;D、ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;E、ALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;F、ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.Which statement accomplishes this task?()A、ALTER TABLE students ADD PRIMARY KEY student_id;B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);C、ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);D、ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()A、ALTER TABLE students ADD PRIMARY KEY _ id;B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);C、ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;D、ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);E、ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

Which statement explicitly names a constraint?()A、ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students(student_id);B、ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);C、ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);D、ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);E、ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);

Examine the following statement that is used to modify the constraint on the SALES table: SQL ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE; Which three statements are true regarding the above command()A、The constraint remains valid.B、The index on the constraint is dropped.C、It allows the loading of data into the table using SQL*Loader.D、New data conforms to the constraint, but existing data is not checkedE、It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.

Examine the following statement that is used to modify the primary key constraint on the SALES table: SQL ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE; Which three statements aretrue regarding the above command()A、The constraint remains valid.B、The index on the constraint is dropped.C、It allows the loading of data into the table using SQL *Loader.D、New data conforms to the constraint, but existing data is not checked.E、It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.

The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()A、Column definitions cannot be altered to add DEFAULT values.B、A change to the DEFAULT value affects only subsequent insertions to the table.C、Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.D、All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

You need to design the restrictions on the Bank.Customers table. Which three actions should you perform?()A、Design a trigger that verifies that the first names and surnames are not empty strings.B、Design a check constraint that verifies that the first names and surnames are not empty strings.C、Design a check constraint that uses a CLR user-defined function to verify that either the phone number is a null value or the format of the phone number is valid.D、Design a trigger that uses a CLR user-defined function to verify that either the phone number is a null value or the format of the phone number is valid.E、Design a check constraint that ensures that the phone number cannot be changed from a valid format to a null value or to an invalid format.F、Design a trigger that ensures that the phone number cannot be changed from a valid format to a null value.

多选题Examine the following statement that is used to modify the primary key constraint on the SALES table: SQL ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE; Which three statements aretrue regarding the above command()AThe constraint remains valid.BThe index on the constraint is dropped.CIt allows the loading of data into the table using SQL *Loader.DNew data conforms to the constraint, but existing data is not checked.EIt allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.

单选题You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()AALTER TABLE students ADD PRIMARY KEY _ id;BALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);CALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;DALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);EALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

多选题You need to design the restrictions on the Bank.Customers table. Which three actions should you perform?()ADesign a trigger that verifies that the first names and surnames are not empty strings.BDesign a check constraint that verifies that the first names and surnames are not empty strings.CDesign a check constraint that uses a CLR user-defined function to verify that either the phone number is a null value or the format of the phone number is valid.DDesign a trigger that uses a CLR user-defined function to verify that either the phone number is a null value or the format of the phone number is valid.EDesign a check constraint that ensures that the phone number cannot be changed from a valid format to a null value or to an invalid format.FDesign a trigger that ensures that the phone number cannot be changed from a valid format to a null value.

单选题The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()AColumn definitions cannot be altered to add DEFAULT values.BA change to the DEFAULT value affects only subsequent insertions to the table.CColumn definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.DAll the rows that have a NULL value for the SALARY column will be updated with the value 5000.

单选题You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.Which statement accomplishes this task?()AALTER TABLE students ADD PRIMARY KEY student_id;BALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);CALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);DALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

单选题You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()AALTER TABLE students ADD PRIMARY KEY student_id;BALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);CALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;DALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);EALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

多选题Examine the following statement that is used to modify the constraint on the SALES table: SQL ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE; Which three statements are true regarding the above command()AThe constraint remains valid.BThe index on the constraint is dropped.CIt allows the loading of data into the table using SQL*Loader.DNew data conforms to the constraint, but existing data is not checkedEIt allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.

单选题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?()AA check constraint on the EMPLOYEE tableBA unique constraint on the EMPLOYEE table WORKDEPT columnCA foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE tableDA foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

单选题Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()AALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;BALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;CALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;DALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;EALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;FALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;