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); 是以下哪个说法()
第1题:
A.工作薄包含单元格,单元格包含工作表
B.工作薄包含工作表,工作表包含单元格
C.工作表包含工作薄,工作薄包含单元格
D.工作表包含单元格,单元格包含工作薄
第2题:
Examine the data from the EMP table:EMP_ID DEPT_ID COMMISSION1 10 5002 20 10003 104 10 6005 30 8006 30 2007 108 20 300The COMMISSION column shows the monthly commission earned by the employee. Which three tasks would require subqueries or joins in order to perform in a single step? ()
A. Deleting the records of employees who do not earn commission.
B. Increasing the commission of employee 3 by the average commission earned in department 20.
C. Finding the number of employees who do NOT earn commission and are working for department 20.
D. Inserting into the table a new employee 10 who works for department 20 and earns a commission that is equal to the commission earned by employee 3.
E. Creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSIONS of the EMP table.
F. Decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more then 800.
第3题:
设在SC(Sno,Cno,Grade)表上定义了触发器: CREATE TRIGGER tri1 ON SC AFTER INSERT … 当执行语句:INSERT INTO SC VALUES(’s001’, ’c01’,90) 会引发该触发器执行。下列关于触发器执行时表中数据的说法,正确的是()。
ASC表和INSERTED表中均包含新插入的数据
BSC表和INSERTED表中均不包含新插入的数据
CSC表中包含新插入的数据,INSERTED表中不包含新插入的数据
DSC表中不包含新插入的数据,INSERTED表中包含新插入的数据
第4题:
通过创建“雇员”表和“部门”表的视图来显示每个部门的薪金信息。 执行以下语句时会发生什么情况() CREATE OR REPLACE VIEW sal_dept AS SELECT SUM(e.salary) sal, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id GROUP BY d.department_name ORDER BY d.department_name.
第5题:
在执行语句SELECT department_id FROM employees,departments WHERE employees.department_id= departments.department_id;时报错,原因是()。
第6题:
标准的GRE头中必选字段包括有()
第7题:
Examine the data in the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 IT_ADMIN 5000 106 Smith 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA*DIR 6500 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Admin 20 Education 30 IT 40 Human Resources Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables: CREATE TABLE departments (department_id NUMBER PRIMARY KEY, department _ name VARCHAR2(30)); CREATE TABLE employees (EMPLOYEE_ID NUMBER PRIMARY KEY, EMP_NAME VARCHAR2(20), DEPT_ID NUMBER REFERENCES departments(department_id), MGR_ID NUMBER REFERENCES employees(employee id), MGR_ID NUMBER REFERENCES employees(employee id), JOB_ID VARCHAR2(15). SALARY NUMBER); ON the EMPLOYEES, On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table. On the DEPARTMENTS table, DEPARTMENT_ID is the primary key. Examine this DELETE statement: DELETE FROM departments WHERE department id = 40; What happens when you execute the DELETE statement?()
第8题:
SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
第9题:
Only the row with department ID 40 is deleted in the DEPARTMENTS table.
The statement fails because there are child records in the EMPLOYEES table with department ID 40.
The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 110 and 106 are deleted from the EMPLOYEES table.
The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 106 and 110 and the employees working under employee 110 are deleted from the EMPLOYEES table.
The row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.
The statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.
第10题:
SELECT COUNT (*) FROM employees WHERE last _name='smith';
SELECT COUNT (dept_id) FROM employees WHERE last _name='smith';
SELECT DISTINCT (COUNT (dept_id) FROM employees WHERE last _name='smith';
SELECT COUNT (DISTINCT dept_id) FROM employees WHERE last _name='smith';
SELECT UNIQE (dept_id) FROM employees WHERE last _name='smith';
第11题:
对
错
第12题:
SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary > MAX (salary);
SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;
SELECT dept_id, job_cat, MAX(salary) FROM employees;
SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;
SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;
第13题:
Examine the description of the EMPLOYEES table:EMP_ID NUMBER(4) NOT NULLLAST_NAME VARCHAR2(30) NOT NULLFIRST_NAME VARCHAR2(30)DEPT_ID NUMBER(2)JOB_CAT VARCHARD2(30)SALARY NUMBER(8,2)Which statement shows the maximum salary paid in each job category of each department? ()
A. SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary > MAX (salary);
B. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;
C. SELECT dept_id, job_cat, MAX(salary) FROM employees;
D. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;
E. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;
第14题:
Examine the data in the EMPLOYEES and DEPARTMENTS tables:
EMPLOYEES
EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY
EMPLOYEE_ID
101 Smith 20 120 SA_REP 4000
102 Martin 10 105 CLERK 2500
103 Chris 20 120 IT_ADMIN 4200
104 John 30 108 HR_CLERK 2500
105 Diana 30 108 IT_ADMIN 5000
106 Smith 40 110 AD_ASST 3000
108 Jennifer 30 110 HR_DIR 6500
110 Bob 40 EX_DIR 8000
120 Ravi 20 110 SA*DIR 6500
DEPARTMENTS
DEPARTMENT_ID DEPARTMENT_NAME
10 Admin
20 Education
30 IT
40 Human Resources
Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables:
CREATE TABLE departments
(department_id NUMBER PRIMARY KEY,
department _ name VARCHAR2(30));
CREATE TABLE employees
(EMPLOYEE_ID NUMBER PRIMARY KEY,
EMP_NAME VARCHAR2(20),
DEPT_ID NUMBER REFERENCES
departments(department_id),
MGR_ID NUMBER REFERENCES
employees(employee id),
MGR_ID NUMBER REFERENCES
employees(employee id),
JOB_ID VARCHAR2(15).
SALARY NUMBER);
ON the EMPLOYEES,
On the EMPLOYEES table, EMPLOYEE_ID is the primary key.
MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table. On the DEPARTMENTS table, DEPARTMENT_ID is the primary key.
Examine this DELETE statement:
DELETE
FROM departments
WHERE department id = 40;
What happens when you execute the DELETE statement?()
第15题:
在Access中,空数据库中()
第16题:
以颜料为混色基础的显色系,包含的表色系有哪些?
第17题:
“雇员”表包含以下列: 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); 以下哪个说法是的()
第18题:
修改表Department添加列Leader数据类型varchar2(10)的语句是:Alter table Department add Leader varchar2(10);
第19题:
Deleting the records of employees who do not earn commission.
Increasing the commission of employee 3 by the average commission earned in department 20.
Finding the number of employees who do NOT earn commission and are working for department 20.
Inserting into the table a new employee 10 who works for department 20 and earns a commission that is equal to the commission earned by employee 3.
Creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSIONS of the EMP table.
Decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more then 800.
第20题:
Seamen on board the ship are in two departments: Deck Department, Engine Department.
Seaman on board the ship are in two department: Deck Department, Engine Department and Service Department.
The Deck Department and the Engine Department are the two departments.
Seamen on board the ship are in three departments: the Deck Department, the Engine Department and the Service Department.
第21题:
The statement produces an error at line 1.
The statement produces an error at line 3.
The statement produces an error at line 6.
The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company.
The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.
第22题:
ALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件
ALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件
ADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败
ALTER TABLE语句执行成功,但不重新创建引用约束条件
第23题:
The cached result becomes invalid when any structural change is done to the EMPLOYEES table.
If the function execution results in an unhandled exception,the exception result is also stored in the cache.
Each time the function is invoked in a different session,the current result in the result cache gets overwritten.
If the function is invoked with a different parameter value,the existing result in the result cache gets overwritten by the latest value.
第24题:
此语句会创建一个基于函数的索引
因为语法错误,此语句将失败
该语句将创建一个组合唯一索引
该语句将创建一个组合非唯一索引