ALTER TABLE students ADD PRIMARY KEY _ id;
ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
第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题:
某数据库系统中,假设有部门关系 Dept (部门号,部门名,负责人,电话),其中, "部门号"是该关系的主键;员工关系 Emp (员工号,姓名,部门,家庭住址),属性"家 庭住址"包含省、市、街道以及门牌号,该属性是一个( )属性。 创建 Emp 关系的 SQL 语句如下: CREATE TABLE Emp( 员工号 CHAR(4) ( ), 姓名 CHAR(10), 部门 CHAR(4), 家庭住址 CHAR(30), ( ); 为在员工关系 Emp 中增加一个"工资"字段,其数据类型为数字型并保留2 位小数, 可采用的 SQL 语句为( )。
A. 简单 B. 复合 C.多值 D. 派生A. PRIMARY KEY B. NULL C. FOREIGN KEY D. NOT NULLA.PRIMARY KEY NOT NULLB. PRIMARY KEY UNIQUEC. FOREIGN KEY REFERENCES Dept(部门名)D. FOREIGN KEY REFERENCES Dept(部门号)A.ALTER TABLE Emp ADD 工资 CHAR(6,2);B.UPDATA TABLE Emp ADD 工资 NUMERIC(6,2);C.ALTER TABLE Emp ADD 工资 NUMERIC (6,2);D.ALTER TABLE Emp MODIFY 工资 NUMERI C(6,2);
第3题:
为表TEST中ID列添加主键约束的语法是()
第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?()
第5题:
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?()
第6题:
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()
第7题:
You have an enterprise subordinate certification authority (CA) configured for key archival. Three key recovery agent certificates are issued. The CA is configured to use two recovery agents. You need to ensure that all of the recovery agent certificates can be used to recover all new private keys. What should you do()
第8题:
The PRIMARY KEY is created along with a new index.
The PRIMARY KEY is created and it would use an existing unique index.
The PRIMARY KEY would be created in a disabled state because it is using an existing index.
The statement produces an error because the USING clause is permitted only in the CREATE TABLE command.
第9题:
You get an error because of a primary key violation.
The data and structure of the EMPLOYEES table are deleted.
The data in the EMPLOYEES table is deleted but not the structure.
You get an error because the statement is not syntactically correct.
第10题:
ALTER TABLE students ADD PRIMARY KEY _ id;
ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
第11题:
ALTER DATABASE FLASHBACK ON
GRANT SELECT any transaction TO scott
GRANT EXECUTE ON dbms_flashback TO scott
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA
ALTER TABLESPACE undots1 RETENTION GUARANTEE
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS
第12题:
ALTER TABLE students ADD PRIMARY KEY student_id;
ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
第13题:
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.
第14题:
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.
第15题:
You need to meet the business requirements of the packaging department. What should you do?()
第16题:
Which two statements are true about the primary key constraint in a table? ()
第17题:
You plan to move data from a flat file to a table in your database. You decide to use SQL*Loader direct pathload method to perform this task. The table in which you plan to load data is an important table having variousintegrity constraints defined on it. Which constraints will remain enabled by default during this operation()
第18题:
You have an Exchange Server 2010 organization.You create a distribution group for all users in your company.You need to ensure that new users can add their mailboxes to the distribution group.What should you do?()
第19题:
You have a computer that runs Windows 7. You create an Encrypting File System (EFS) recovery key andcertificate. You need to ensure that your user account can decrypt all EFS files on the computer. Whatshould you do?( )
第20题:
You should drop the XML index on the table. Modify the primary key. Recreate the XML index
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.
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.
You should disable the XML index on the GoodsDetails column. Modify the primary key.Enable the XML index on the ProductSpecs column.
第21题:
ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
第22题:
It is not possible to disable the primary key constraint.
It is possible to have more than one primary key constraint in a single table.
The primary key constraint can be referred by only one foreign key constraint.
The primary key constraint can be imposed by combining more than one column.
The non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.
第23题:
CREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY student (student_id));
CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));
CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT FOREIGN KEY (student_id) REFERENCES student (student_id));
CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));
第24题:
ALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)
ALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)
ALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)
ALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)