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?()
第1题:
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);
第2题:
要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()
第3题:
下列说法正确的是()
A.alter table user drop column sex;
B.alter table user add sex varchar(20);
C.alter table user drop sex;
D.alter table user modify id int primary key;
第4题:
Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()
第5题:
Which two statements are true about the primary key constraint in a table? ()
第6题:
为表TEST中ID列添加主键约束的语法是()
第7题:
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?()
第8题:
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);
第9题:
You need to design a student registration database that contains several tables storing academic information. The STUDENTS table stores information about a student. The STUDENT_GRADES table stores information about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key. You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that points to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?()
第10题:
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?()