网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_ NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?()
A

SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000;

B

SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;

C

SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;

D

SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;

E

SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;


参考答案

参考解析
解析: 暂无解析
更多 “单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_ NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?()A SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000;B SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000 GROUP BY dept_id;C SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) 5000 AND MAX(salary) 15000;D SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) 5000 AND MAX(salary) 15000;E SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) 5000 AND MAX(salary) 15000;” 相关考题
考题 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;

考题 Examine the structure of the EMPLOYEES table:You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below:Which UPDATE statement meets the requirements?()A.B.C.D.E.

考题 Examine the structure of the EMPLOYEES table:What is the correct syntax for an inline view?() A.B.C.D.

考题 Examine the data from the EMP table:The 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.

考题 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.

考题 Examine the data in the EMPLOYEES and EMP_HIST tables:The EMP_HIST table is updated at the end of every year. The employee ID, name, job ID, and salary of each existing employee are modified with the latest data. New employee details are added to the table.Which statement accomplishes this task?()A.B.C.D.

考题 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.

考题 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.

考题 Examine the data in the EMPLOYEES and DEPARTMENTS tables:Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables: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:What happens when you execute the DELETE statement?()A. Only the row with department ID 40 is deleted in the DEPARTMENTS table.B. The statement fails because there are child records in the EMPLOYEES table with department ID 40.C. 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.D. 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.E. The row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.F. The statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.

考题 Examine the following commands for redefining a table with Virtual Private Database (VPD) policies:Which two statements are true about redefining the table?() A. All the triggers for the table are disabled without changing any of the column names or column types in the table.B. The primary key constraint on the EMPLOYEES table is disabled during redefinition.C. VPD policies are copied from the original table to the new table during online redefinition.D. You must copy the VPD policies manually from the original table to the new table during online redefinition.

考题 Click the Exhibit button to examine the data of the EMPLOYEES table. Evaluate this SQL statement:SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.employee_id Mgr_id, m.emp_name ManagerFROM employees e JOIN employees m ON (e.mgr_id = m.employee_id)AND e.salary 4000;What is its output?()A.AB.BC.CD.DE.E

考题 Click the Exhibit button to examine the data of the EMPLOYEES table.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.SELECT employee_id Emp_id, emp_name Employee, salary, employee_id Mgr_id, emp_name Manager FROM employees WHERE salary 4000;B.SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.employee_id Mgr_id, m.emp_name Manager FROM employees e JOIN employees m WHERE e.mgr_id = m.mgr_id AND e.salary 4000;C.SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.employee_id Mgr_id, m.emp_name Manager FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id) AND e.salary 4000;D.SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.mgr_id Mgr_id, m.emp_name Manager FROM employees e SELF JOIN employees m WHERE e.mgr_id = m.employee_id AND e.salary 4000;E.SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.mgr_id Mgr_id m.emp_name Manager FROM employees e JOIN employees m USING (e.employee_id = m.employee_id) AND e.salary 4000;

考题 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?()A、Only the row with department ID 40 is deleted in the DEPARTMENTS table.B、The statement fails because there are child records in the EMPLOYEES table with department ID 40.C、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.D、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.E、The row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.F、The statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.

考题 多选题Examine the data from the EMP table: EMP_ID DEPT_ID COMMISSION 1 10 500 2 20 1000 3 10 4 10 600 5 30 800 6 30 200 7 10 8 20 300 The 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? ()ADeleting the records of employees who do not earn commission.BIncreasing the commission of employee 3 by the average commission earned in department 20.CFinding the number of employees who do NOT earn commission and are working for department 20.DInserting 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.ECreating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSIONS of the EMP table.FDecreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more then 800.

考题 单选题Examine the statement:Create synonym emp for hr. employees;What happens when you issue the statement?()A An error is generated.B You will have two identical tables in the HR schema with different names.C You create a table called employees in the HR schema based on you EMP table.D You create an alternative name for the employees table in the HR schema in your own schema.

考题 单选题View the Exhibit and examine the details of the EMPLOYEES table.  The query was written to format the PHONE_NUMBER for the employees.   Which option would be the correct format in the output?()A  xxx-xxx-xxxxB  (xxx) xxxxxxxC  (xxx) xxx-xxxxD  xxx-(xxx)-xxxx

考题 单选题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?()A Only the row with department ID 40 is deleted in the DEPARTMENTS table.B The statement fails because there are child records in the EMPLOYEES table with department ID 40.C 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.D 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.E The row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.F The statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.

考题 单选题You need to change the definition of an existing table. The COMMERCIALS table needs its DESCRIPTION column changed to hold varying length characters up to 2000 bytes. The column can currently hold 1000 bytes per value. The table contains 20000 rows. Which statement is valid?()A ALTER TABLE commercials MODIFY (description CHAR2(2000));B ALTER TABLE commercials CHANGE (description CHAR2(2000));C ALTER TABLE commercials CHANGE (description VARCHAR2 (2000));D ALTER TABLE commercials MODIFY (description VARCHAR2 (2000));E You cannot increase the size of a column if the table has rows.

考题 单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) Which statement produces the number of different departments that have employees with last name Smith? ()A SELECT COUNT (*) FROM employees WHERE last _name='smith';B SELECT COUNT (dept_id) FROM employees WHERE last _name='smith';C SELECT DISTINCT (COUNT (dept_id) FROM employees WHERE last _name='smith';D SELECT COUNT (DISTINCT dept_id) FROM employees WHERE last _name='smith';E SELECT UNIQE (dept_id) FROM employees WHERE last _name='smith';

考题 单选题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 following commands executed in your database: SQL ALTER SESSION RECYCLEBIN=ON; Session altered  SQL  CREATE TABLE emp TABLESPACE tbsfd AS SELECT * FROM hr.employees;  Table created.  Further, you executed the following command to drop the table:  SQL DROP TABLE emp;Table dropped.  What happens in this scenario?()A The table is moved to the SYSAUX tablespace.B The table is moved to the SYSTEM tablespace.C The table is removed from the database permanently.D The table is renamed and remains in the TBSFD tablespace.

考题 多选题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',);

考题 单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_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;

考题 单选题Exhibit: Examine the data in the EMPLOYEES table. Examine the subquery: SELECT last_name FROM employees WHERE salary IN (SELECT MAX(salary) FROM employees GROUP BY department_id); Which statement is true?()A The SELECT statement is syntactically accurate.B The SELECT statement does not work because there is no HAVING clause.C The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.D The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.