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;

相关考题:

以下语句错误的是( )A. alter table emp delete column addcolumn;B. alter table emp modify column addcolumn char(10);C.alter table emp change addcolumn addcolumn int;D. alter table emp add column addcolumn int;

以下能够删除一列的是( )A.alter table emp remove addcolumnB.alter table emp drop column addcolumnC.alter table emp delete column addcolumnD.alter table emp delete addcolumn

Which is a valid CREATE TABLE statement? () A. CREATE TABLE EMP9$# AS (empid number(2));B. CREATE TABLE EMP*123 AS (empid number(2));C. CREATE TABLE PACKAGE AS (packid number(2));D. CREATE TABLE 1EMP_TEST AS (empid number(2));

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;

You need to replicate a table from a master to a slave. The master and slave copies of the table will have different number of columns.Which two conditions must be true?() A.Each extra column in the copy with more columns must not have a default valueB.Columns that are common to both versions of the table must be defined in the same order on the master and the slaveC.The slave database cannot have more columns than the master. Only the master database can have more columnsD.Columns that are common to both versions of the table must come first in the table definition, before any additional columns are additional columns are defined on either serverE.The master database cannot have more columns than the slave. Only the slave deatbase can have more columns

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.

The STUDENT_GRADES table has these columns:The registrar has asked for a report on the average grade point average (GPA) for students enrolled during semesters that end in the year 2000. Which statement accomplish this?()A.B.C.D.E.F.

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.

In which of the following situations should correlation names be used?() A.A table referenced in the FROM clause has no indexed column.B.The table referenced in the FROM clause has more than 200 columns.C.Two or more tables in the FROM clause have identical column names.D.The FROM clause contains two or more tables in the SELECT statement.

In which of the following situations should correlation names be used?()A、A table referenced in the FROM clause has no indexed column.B、The table referenced in the FROM clause has more than 200 columns.C、Two or more tables in the FROM clause have identical column names.D、The FROM clause contains two or more tables in the SELECT statement.

You need to replicate a table from a master to a slave. The master and slave copies of the table will have different number of columns. Which two conditions must be true?()A、Each extra column in the copy with more columns must not have a default valueB、Columns that are common to both versions of the table must be defined in the same order on the master and the slaveC、The slave database cannot have more columns than the master. Only the master database can have more columnsD、Columns that are common to both versions of the table must come first in the table definition, before any additional columns are additional columns are defined on either serverE、The master database cannot have more columns than the slave. Only the slave deatbase can have more columns

Examine the contents of SQL loader control file: Which three statements are true regarding the SQL* Loader operation performed using the control file?()A、An EMP table is created if a table does not exist. Otherwise, if the EMP table is appended with the loaded data.B、The SQL* Loader data file myfile1.dat has the column names for the EMP table.C、The SQL* Loader operation fails because no record terminators are specified.D、Field names should be the first line in the both the SQL* Loader data files.E、The SQL* Loader operation assumes that the file must be a stream record format file with the normal carriage return string as the record terminator.

Why would you use the following FLASHBACK TABLE command?() FLASHBACK TABLE emp TO TIMESTAMP (’11:45’,’hh12:mi’); A、to undo the changes made to the EMP table since the specified timeB、to restore the EMP table that was wrongly dropped from the databaseC、to view the transactions that have modified the EMP table since the specified timeD、to view the changes made to the EMP table for one or more rows since the specified timeE、to recover the EMP table to a point in time in the past by restoring the most recent backup

You executed the following FLASHBACK TABLE command: FLASHBACK TABLE emp TO TIMESTAMP (’11:45’,’hh12:mi’); Which two statements are correct? ()A、 The FLASHBACK TABLE statement will not be written to the alert log file.B、 The EMP table that was dropped by mistake from the database will be restored.C、 The changes made to the EMP table since the specified time will be undone.D、 The FLASHBACK TABLE statement will not maintain the existing indexes on the EMP table.E、 The FLASHBACK TABLE statement will be executed within a single transaction.F、 The list of transactions that have modified the EMP table since the specified time will be displayed.

单选题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?()ArandomlyBascending by dateCdescending by dateDascending alphabeticallyEdescending alphabetically

多选题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.

多选题You need to replicate a table from a master to a slave. The master and slave copies of the table will have different number of columns. Which two conditions must be true?()AEach extra column in the copy with more columns must not have a default valueBColumns that are common to both versions of the table must be defined in the same order on the master and the slaveCThe slave database cannot have more columns than the master. Only the master database can have more columnsDColumns that are common to both versions of the table must come first in the table definition, before any additional columns are additional columns are defined on either serverEThe master database cannot have more columns than the slave. Only the slave deatbase can have more columns

单选题Why would you use the following FLASHBACK TABLE command?()  FLASHBACK TABLE emp TO TIMESTAMP (’11:45’,’hh12:mi’);Ato undo the changes made to the EMP table since the specified timeBto restore the EMP table that was wrongly dropped from the databaseCto view the transactions that have modified the EMP table since the specified timeDto view the changes made to the EMP table for one or more rows since the specified timeEto recover the EMP table to a point in time in the past by restoring the most recent backup

单选题Why would you use the following FLASHBACK TABLE command?() FLASHBACK TABLE emp TO TIMESTAMP (’11:45’.’hh12:mi’);A to undo the changes made to the EMP table since the specified timeB to restore the EMP table that was wrongly dropped from the databaseC to view the transactions that have modified the EMP table since the specified timeD to view the changes made to the EMP table for one or more rows since the specified time

多选题You executed the following FLASHBACK TABLE command: FLASHBACK TABLE emp TO TIMESTAMP (’11:45’,’hh12:mi’); Which two statements are correct?()AThe FLASHBACK TABLE statement will not be written to the alert log file.BThe changes made to the EMP table since the specified time will be undone.CThe EMP table that was dropped by mistake from the database will be restored.DThe FLASHBACK TABLE statement will be executed within a single transaction.EThe FLASHBACK TABLE statement will not maintain the existing indexes on the EMP table.FThe list of transactions that have modified the EMP table since the specified time will be displayed.

单选题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 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? ()ASELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE 5;BSELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE 5;CSELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 5;DSELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 5;

单选题The HR user creates a view with this command:  SQL CREATE VIEW emp_v AS SELECT * FROM scott.emp;  Now HR wants to grant the SELECT privilege on the EMP_V view to the JIM user.  Which statement is true in this scenario?()AHR can grant the privilege to JIM but without GRANT OPTION.BHR can grant the privilege to JIM because HR is the owner of the view.CSCOTT has to grant the SELECT privilege on the EMP table to JIM before this operation.DHR needs the SELECT privilege on the EMP table with GRANT OPTION from SCOTT for this operation.

单选题Which is a valid CREATE TABLE statement?()ACREATE TABLE EMP9$# AS (empid number(2));BCREATE TABLE EMP*123 AS (empid number(2));CCREATE TABLE PACKAGE AS (packid number(2));DCREATE TABLE 1EMP_TEST AS (empid number(2));

多选题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 job FROM emp  2  WHERE job=’CLERK’ FOR UPDATE OF empno;  SCOTT has opened another session to work with the database. Which three operations would wait when issued in SCOTT’s second session?()ALOCK TABLE emp IN SHARE MODE;BLOCK TABLE emp IN EXCLUSIVE MODE;CDELETE FROM emp WHERE job=’MANAGER’;DINSERT INTO emp(empno,ename) VALUES (1289,’Dick’);ESELECT job 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, 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

单选题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?()ASELECT last_name, 12*salary* commission_pct FROM emp;BSELECT last_name, 12*salary* (commission_pct,0) FROM emp;CSELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;DSELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;