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

题目内容 (请给出正确答案)
单选题
The EMP table has these columns: ENAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants a list of names of employees who have been with the company for more than five years. Which SQL statement displays the required results? ()
A

SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE >5;

B

SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE >5;

C

SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 >5;

D

SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 >5;


参考答案

参考解析
解析: 暂无解析
更多 “单选题The EMP table has these columns: ENAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants a list of names of employees who have been with the company for more than five years. Which SQL statement displays the required results? ()A SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE 5;B SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE 5;C SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 5;D SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 5;” 相关考题
考题 The EMP table has these columns:ENAME VARCHAR2(35)SALARY NUMBER(8,2)HIRE_DATE DATEManagement wants a list of names of employees who have been with the company for more than five years. Which SQL statement displays the required results? ()A. SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE 5;B. SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE 5;C. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 5;D. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 5;

考题 Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table? () A. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) NOT NULL CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);B. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));C. CREATE TABLE EMP (empno NUMBER(4) ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));D. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));

考题 ● 设有职工表emp(Eno,Ename,Sex,Age)(Eno为职工号,Ename为职工姓名,Sex为性别,Age为年龄)和salary(Eno,Hour,Month,Wage)(Hour为工作时长为多少小时,Month表示几月份,Wage为薪水),建立一个视图V-Salary(Eno,Ename,Hour,Month,Wage),并按Eno升序排序的SQL语句为:(1)CREATE ( )AS SELECT emp.Eno,emp.Ename ,salary.Hour,salary.Month,salary.WageFROM emp, salaryWHERE emp.Eno=salary.EnoORDER BY ENO在此视图上查均月工资在3000以上的职工工资情况的SQL语句为:SELECT Eno,Ename,AVG(Wage)FROM V-SalaryGROUP BY ( )HAVING AVG(Wage)3000( )A. CREATE TABLE V-Salary(emp.Eno,emp.Ename,salary.Hour,salary.Month,salary.Wage)B. CREATE VIEW V-Salary(Eno,Ename,Hour,Month,Wage)C. CREATE TABLE V-Salary(Eno,Ename,Hour,Month,Wage)D. CREATE INDEX V-Salary(Eno,Ename,Hour,Month,Wage)( )A. Eno B.EnameC.Month D.Wage

考题 你要操纵Oracle数据,下列哪个不是SQL命令?()A、select*from dual;B、set defineC、update emp set ename=6543where ename=‘SMITHERS’;D、create table employees(empid varchar2(10)primary key);

考题 The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()A、randomlyB、ascending by dateC、descending by dateD、ascending alphabeticallyE、descending alphabetically

考题 单选题The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()A randomlyB ascending by dateC descending by dateD ascending alphabeticallyE descending alphabetically

考题 单选题Evaluate this SQL statement: SELECT ename, sal, 12* sal+100 FROM emp; The SAL column stores the monthly salary of the employee. Which change must be made to the above syntax to calculate the annual compensation as "monthly salary plus a monthly bonus of $100, multiplied by 12"?()A No change is required to achieve the desired results.B SELECT ename, sal, 12* (sal+100) FROM emp;C SELECT ename, sal, (12* sal)+100 FROM emp;D SELECT ename, sal +100,*12 FROM emp;

考题 单选题The EMPLOYEES table has these columns: LAST NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement: ALTER TABLE EMPLOYEES MODIFY ( SALARY DEFAULT 5000); What is true about your ALTER statement?()A Column definitions cannot be altered to add DEFAULT values.B A change to the DEFAULT value affects only subsequent insertions to the table.C Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.D All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

考题 单选题The ADMIN_EMP table has columns EMPNO, ENAME, DEPTNO, and SAL. It has a materialized view EMP_MV with a materialized log and an ENAME_IDX index on the ENAME column. You need to perform an online table redefinition on the ADMIN_EMP table to move it from the TBS1 tablespace to the TBS2 tablespace in the same schema.  What action is required for the dependent objects when you perform online redefinition on the table?()A  The materialized view should have a complete refresh performed after the online table redefinition is completed.B  The materialized view should have a fast refresh performed after the online table redefinition is completed.C  The materialized view,materialized log,and the index should be dropped and re-created after the online table redefinition is complete.D  The materialized view and materialized log should be dropped and all constraints disabled and re-created after the online table redefinition is complete.

考题 单选题The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()A randomlyB ascending by dateC descending by dateD ascending alphabeticallyE descending alphabetically

考题 单选题Which SQL statement defines a FOREIGN KEY constraint on the DEPTNO column of the EMP table?()A CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);B CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));C CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));D CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

考题 单选题The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()A Column definitions cannot be altered to add DEFAULT values.B A change to the DEFAULT value affects only subsequent insertions to the table.C Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.D All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

考题 单选题Examine the structure of the EMP_DEPT_VU view: Column Name Type Remarks EMPLOYEE_ID NUMBER From the EMPLOYEES table EMP_NAME VARCHAR2(30) From the EMPLOYEES table JOB_ID VARCHAR2(20) From the EMPLOYEES table SALARY NUMBER From the EMPLOYEES table DEPARTMENT_ID NUMBER From the DEPARTMENTS table DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table Which SQL statement produces an error?()A SELECT * FROM emp_dept_vu;B SELECT department_id, SUM(salary) FROM emp_dept_vu GROUP BY department _ id;C SELECT department_id, job_id, AVG(salary) FROM emp_dept_vu GROUP BY department _ id, job_id;D SELECT job_id, SUM(salary) FROM emp_dept_vu WHERE department_id IN (10,20) GROUP BY job_id HAVING SUM (salary) 20000E None of the statements produce an error; all are valid.

考题 多选题User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, or any data definition language (DDL) command: SQL SELECT ename FROM emp  2 WHERE job=’CLERK’ FOR UPDATE OF empno;  SCOTT has opened another session to work with the database instance.  Which three operations wouldwait when issued in SCOTT’s second session()ALOCK TABLE emp IN SHARE MODE;BLOCK TABLE emp IN EXCLUSIVE MODE;CUPDATE emp SET sal=sal*1.2 WHERE job=MANAGER;DINSERT INTO emp(empno,ename) VALUES (1289,’Harry’);ESELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;

考题 多选题User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, orany data definition language (DDL) command: SQL SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database instance.  Which three operations would waitwhen issued in SCOTT’s second session()ALOCK TABLE emp IN SHARE MODE;BLOCK TABLE emp IN EXCLUSIVE MODE;CUPDATE emp SET sal=sal*1.2 WHERE job=ANAGER?UPDATE emp SET sal=sal*1.2 WHERE job=?ANAGER?DINSERT INTO emp(empno,ename) VALUES (1289,’Harry’);ESELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno

考题 单选题Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table?()A CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) NOT NULL CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);B CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));C CREATE TABLE EMP (empno NUMBER(4) ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));D CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));

考题 单选题Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP table. The EMP table contains these columns: LAST NAME VARCNAR2(35) NOT NULL SALARY NUMBER(9,2) NOT NULL COMMISION_PCT NUMBER(4,2) Which statement ensures that a value is displayed in the calculated columns for all employees?()A SELECT last_name, 12*salary* commission_pct FROM emp;B SELECT last_name, 12*salary* (commission_pct,0) FROM emp;C SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;D SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;

考题 单选题The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(4) ENAME VARCHAR2 (25) JOB_ID VARCHAR2(10) Which SQL statement will return the ENAME, length of the ENAME, and the numeric position of the letter "a" in the ENAME column, for those employees whose ENAME ends with a the letter "n"?()A SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, 'a') FROM EMPLOYEES WHERE SUBSTR (ENAME, -1,1) = 'n';B SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, ,-1,1) FROM EMPLOYEES WHERE SUBSTR (ENAME, -1,1) = 'n';C SELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1) FROM EMPLOYEES WHERE INSTR (ENAME, 1,1) = 'n';D SELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1) FROM EMPLOYEES WHERE INSTR (ENAME, -1,1) = 'n';

考题 单选题Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP table. The EMP table contains these columns: LAST NAME VARCNAR2(35) NOT NULL SALARY NUMBER(9,2) NOT NULL COMMISION_PCT NUMBER(4,2) Which statement ensures that a value is displayed in the calculated columns for all employees? ()A SELECT last_name, 12*salary* commission_pct FROM emp;B SELECT last_name, 12*salary* (commission_pct,0) FROM emp;C SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;D SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;