评估以下语句: ALTER TABLE employees ADD CONSTRAINT employee_id PRIMARY KEY; 该语句将返回以下哪种结果()A、将返回语法错误B、将向EMPLOYEES表添加约束条件C、将改写EMPLOYEES表的一个现有约束条件D、将启用EMPLOYEES表的一个现有约束条件
评估以下语句: ALTER TABLE employees ADD CONSTRAINT employee_id PRIMARY KEY; 该语句将返回以下哪种结果()
- A、将返回语法错误
- B、将向EMPLOYEES表添加约束条件
- C、将改写EMPLOYEES表的一个现有约束条件
- D、将启用EMPLOYEES表的一个现有约束条件
相关考题:
Examine the data of the EMPLOYEES table.EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID)Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee‘s manager, for all the employees who have a manager and earn more than 4000?()A.B.C.D.E.
下列有关NOT NULL约束条件的表述中,哪两项是正确的?()A、Oracle Server会为未命名的NOT NULL约束条件创建名称。B、可以在表级或列级定义NOT NULL约束条件。C、NOT NULL约束条件要求列中的每个值都是唯一的。D、有NOT NULL约束条件的列默认可以包含空值。E、不能使用ALTER TABLE ADD CONSTRAINT语句向现有列添加NOT NULL约束条件。
为表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)
“雇员”表在LAST_NAME列上有一个名为LN_IDX的索引。您要将此索引更改为FIRST_NAME列的索引。以下哪条SQL语句将实现此操作()A、ALTER INDEX ln_idx ON employees(first_name)B、ALTER INDEX ln_idx TO employees(first_name)C、ALTER INDEX ln_idx TO fn_idx ON employees(first_name)D、以上都不能;您无法变更索引
PO_DETAILS表包含以下列: PO_NUM NUMBER NOT NULL, Primary Key PO_LINE_ID NUMBER NOT NULL, Primary Key PRODUCT_ID NUMBER Foreign Key to PRODUCT_ID column of the PRODUCTS table QUANTITY NUMBER UNIT_PRICE NUMBER(5,2) 请评估以下语句: ALTER TABLE po_details DISABLE CONSTRAINT po_details_pk CASCADE;此语句用于完成什么任务()A、新创建一个对PO_NUM列的PRIMARYKEY约束条件B、删除并重新创建对PO_NUM列的PRIMARYKEY以及FOREIGNKEY的约束条件C、禁用依赖于PO_NUM列的所有FOREIGNKEY约束条件D、禁用对PO_NUM列的约束条件,同时创建PRIMARYKEY索引
您在公司的数据库中成功创建了名为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)
您要对EMPLOYEES表的FIRST_NAME和LAST_NAME列创建一个组合索引。以下哪条语句将完成此任务()A、CREATE INDEXfl_idx ON employees(first_name last_name)B、CREATE INDEXfl_idx ON employees(first_name),employees(last_name)C、CREATE INDEXfl_idx ON employees(first_name,last_name)D、CREATE INDEXfl_idx ON employees(first_name);CREATE INDEXfl_idx ON employees(last_name)
要向雇员表中的部门标识列添加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(部门标识)
DEPARTMENT 表包含以下列: DEPT_ID NUMBER, Primary Key DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER EMPLOYEE 表包含以下列: EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER(9,2) HIRE_DATE DATE 请评估以下语句: ALTER TABLE employee ADD CONSTRAINT REFERENTIAL (mgr_id) TO department(mgr_id); 是以下哪个说法()A、ALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件B、ALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件C、ADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败D、ALTER TABLE语句执行成功,但不重新创建引用约束条件
以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).A、更改employees表并禁用emp_manager_fk约束条件B、向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员C、向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识D、更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一
“雇员”表包含以下列: EMPLOYEE_ID NOT NULL, Primary Key SSNUM NOT NULL, Unique LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER 部门表中 DEPARTMENT_ID 列的外键 SALARY NUMBER(8,2) 如果执行以下语句: CREATE INDEX emp_name_idx ON employees(last_name, first_name); 以下哪个说法是的()A、此语句会创建一个基于函数的索引B、因为语法错误,此语句将失败C、该语句将创建一个组合唯一索引D、该语句将创建一个组合非唯一索引
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements inserts a row into the table? ()A、INSERT INTO employees VALUES (NULL, 'JOHN','Smith');B、INSERT INTO employees( first_name, last_name) VALUES ('JOHN','Smith');C、INSERT INTO employees VALUES ('1000','JOHN','NULL');D、INSERT INTO employees(first_name,last_name, employee_id) VALUES ('1000, 'john','Smith');E、INSERT INTO employees (employee_id) VALUES (1000);F、INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'john',");
You own a table called EMPLOYEES with this table structure: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE What happens when you execute this DELETE statement? DELETE employees;()A、You get an error because of a primary key violation.B、The data and structure of the EMPLOYEES table are deleted.C、The data in the EMPLOYEES table is deleted but not the structure.D、You get an error because the statement is not syntactically correct.
The EMPLOYEES table is stored in the SAMPLE tablespace. The corresponding IPK_EMP index for the EMPLOYEES table’s primary key is stored in the INDX tablespace. Out of 12 partitions, only partition P1 of the SALES table is stored in the SAMPLE tablespace. Which object will be exported by this command?() exp system/manager tablespaces=SAMPLEA、Only the EMPLOYEES table.B、Only the EMPLOYEES table and its corresponding primary key index.C、The EMPLOYEES table and partition P1.D、The EMPLOYEES table, IPK_EMP index, and the SALES table.
Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: EMPLOYEES EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE NEW_EMPLOYEES EMPLOYEE_ID NUMBER Primary Key NAME VARCHAR2 (60) Which DELETE statement is valid?()A、DELETE FROM employees WHERE employee_id = (SELECT employee_id FROM employees);B、DELETE * FROM employees WHERE employee_id = (SELECT employee_id FROM new_ employees);C、DELETE FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name = 'carrey');D、DELETE * FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name = 'carrey');
单选题You own a table called EMPLOYEES with this table structure: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE What happens when you execute this DELETE statement? DELETE employees; ()AYou get an error because of a primary key violation.BThe data and structure of the EMPLOYEES table are deleted.CThe data in the EMPLOYEES table is deleted but not the structure.DYou get an error because the statement is not syntactically correct.
单选题DEPARTMENT 表包含以下列: DEPT_ID NUMBER, Primary Key DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER EMPLOYEE 表包含以下列: EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER(9,2) HIRE_DATE DATE 请评估以下语句: ALTER TABLE employee ADD CONSTRAINT REFERENTIAL (mgr_id) TO department(mgr_id); 是以下哪个说法()AALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件BALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件CADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败DALTER TABLE语句执行成功,但不重新创建引用约束条件
单选题“雇员”表包含以下列: EMPLOYEE_ID NOT NULL, Primary Key SSNUM NOT NULL, Unique LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER 部门表中 DEPARTMENT_ID 列的外键 SALARY NUMBER(8,2) 如果执行以下语句: CREATE INDEX emp_name_idx ON employees(last_name, first_name); 以下哪个说法是的()A此语句会创建一个基于函数的索引B因为语法错误,此语句将失败C该语句将创建一个组合唯一索引D该语句将创建一个组合非唯一索引
单选题PO_DETAILS表包含以下列: PO_NUM NUMBER NOT NULL, Primary Key PO_LINE_ID NUMBER NOT NULL, Primary Key PRODUCT_ID NUMBER Foreign Key to PRODUCT_ID column of the PRODUCTS table QUANTITY NUMBER UNIT_PRICE NUMBER(5,2) 请评估以下语句: ALTER TABLE po_details DISABLE CONSTRAINT po_details_pk CASCADE;此语句用于完成什么任务()A新创建一个对PO_NUM列的PRIMARYKEY约束条件B删除并重新创建对PO_NUM列的PRIMARYKEY以及FOREIGNKEY的约束条件C禁用依赖于PO_NUM列的所有FOREIGNKEY约束条件D禁用对PO_NUM列的约束条件,同时创建PRIMARYKEY索引
单选题您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()AALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)BALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)CALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)DALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)
单选题You own a table called EMPLOYEES with this table structure: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE What happens when you execute this DELETE statement? DELETE employees;()AYou get an error because of a primary key violation.BThe data and structure of the EMPLOYEES table are deleted.CThe data in the EMPLOYEES table is deleted but not the structure.DYou get an error because the statement is not syntactically correct.
多选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements insert a row into the table? ()AINSERT INTO employees VALUES ( NULL, 'John', 'Smith');BINSERT INTO employees( first_name, last_name) VALUES( 'John', 'Smith');CINSERT INTO employees VALUES ( '1000', 'John', NULL);DINSERT INTO employees (first_name, last_name, employee_id) VALUES ( 1000, 'John', 'Smith');EINSERT INTO employees (employee_id) VALUES (1000);FINSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'John', ' ');
单选题评估以下语句: ALTER TABLE employees ADD CONSTRAINT employee_id PRIMARY KEY; 该语句将返回以下哪种结果()A将返回语法错误B将向EMPLOYEES表添加约束条件C将改写EMPLOYEES表的一个现有约束条件D将启用EMPLOYEES表的一个现有约束条件
单选题The EMPLOYEES table is stored in the SAMPLE tablespace. The corresponding IPK_EMP index for the EMPLOYEES table’s primary key is stored in the INDX tablespace. Out of 12 partitions, only partition P1 of the SALES table is stored in the SAMPLE tablespace. Which object will be exported by this command?() exp system/manager tablespaces=SAMPLEAOnly the EMPLOYEES table.BOnly the EMPLOYEES table and its corresponding primary key index.CThe EMPLOYEES table and partition P1.DThe EMPLOYEES table, IPK_EMP index, and the SALES table.
单选题以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).A更改employees表并禁用emp_manager_fk约束条件B向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员C向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识D更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一
单选题“雇员”表在LAST_NAME列上有一个名为LN_IDX的索引。您要将此索引更改为FIRST_NAME列的索引。以下哪条SQL语句将实现此操作()AALTER INDEX ln_idx ON employees(first_name)BALTER INDEX ln_idx TO employees(first_name)CALTER INDEX ln_idx TO fn_idx ON employees(first_name)D以上都不能;您无法变更索引
多选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements inserts a row into the table? ()AINSERT INTO employees VALUES (NULL, 'JOHN','Smith');BINSERT INTO employees( first_name, last_name) VALUES ('JOHN','Smith');CINSERT INTO employees VALUES ('1000','JOHN','NULL');DINSERT INTO employees(first_name,last_name, employee_id) VALUES ('1000, 'john','Smith');EINSERT INTO employees (employee_id) VALUES (1000);FINSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'john',);