单选题The EMP table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) DEPARTMENT_ID NUMBER (6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTM

题目
单选题
The EMP table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) DEPARTMENT_ID NUMBER (6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARTMENT_ID = NULL; What is true about this SQL statement ?()
A

The SQL statement displays the desired results.

B

The column in the WHERE clause should be changed to display the desired results.

C

The operator in the WHERE clause should be changed to display the desired results.

D

The WHERE clause should be changed to use an outer join to display the desired results.


相似考题
参考答案和解析
正确答案: C
解析: 暂无解析
更多“单选题The EMP table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) DEPARTMENT_ID NUMBER (6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTM”相关问题
  • 第1题:

    Click the Exhibit button and examine the data in the EMPLOYEES table.Which three subqueries work? ()

    A.SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);

    B.SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);

    C.SELECT distinct department_id FROM employees WHERE salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);

    D.SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);

    E.SELECT last_name FROM employees WHERE salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);

    F.SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));


    参考答案:C, D, E

  • 第2题:

    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;

    正确答案:C

  • 第3题:

    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 UNIQUE(dept_id) FROM employees WHERE last_name='Smith';

    正确答案:D

  • 第4题:

    You need to display the last names of those employees who have the letter "A" as the second character in their names. Which SQL statement displays the required results? ()

    • A、SELECT last_name FROM EMP WHERE last_ name LIKE '_A%';
    • B、SELECT last_name FROM EMP WHERE last name ='*A%'
    • C、SELECT last_name FROM EMP WHERE last name ='_A%';
    • D、SELECT last_name FROM EMP WHERE last name LIKE '*A%'

    正确答案:A

  • 第5题:

    The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; What is true about this SQL statement? ()

    • A、The SQL statement displays the desired results.
    • B、The column in the WHERE clause should be changed to display the desired results.
    • C、The operator in the WHERE clause should be changed to display the desired results.
    • D、The WHERE clause should be changed to use an outer join to display the desired results.

    正确答案:C

  • 第6题:

    You need to display the last names of those employees who have the letter “A” as the second character in their names.Which SQL statement displays the required results?()

    • A、SELECT last_name   FROM EMP   WHERE last_name LIKE ‘_A%’;
    • B、SELECT last_name   FROM EMP   WHERE last name =’*A%’
    • C、SELECT last_name   FROM EMP   WHERE last name =’_A%’;
    • D、SELECT last_name   FROM EMP   WHERE last name LIKE ‘*A%’

    正确答案:A

  • 第7题:

    The EMP table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) DEPARTMENT_ID NUMBER (6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARTMENT_ID = NULL; What is true about this SQL statement ?()

    • A、The SQL statement displays the desired results.
    • B、The column in the WHERE clause should be changed to display the desired results.
    • C、The operator in the WHERE clause should be changed to display the desired results.
    • D、The WHERE clause should be changed to use an outer join to display the desired results.

    正确答案:C

  • 第8题:

    单选题
    The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; What is true about this SQL statement?()
    A

    The SQL statement displays the desired results.

    B

    The column in the WHERE clause should be changed to display the desired results.

    C

    The operator in the WHERE clause should be changed to display the desired results.

    D

    The WHERE clause should be changed to use an outer join to display the desired results.


    正确答案: B
    解析: 暂无解析

  • 第9题:

    单选题
    The EMPLOYEE tables has these columns: LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) COMMISSION_PCT NUMBER(5,2) You want to display the name and annual salary multiplied by the commission_pct for all employees. For records that have a NULL commission_pct, a zero must be displayed against the calculated column. Which SQL statement displays the desired results?()
    A

    SELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;

    B

    SELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;

    C

    SELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;

    D

    SELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;


    正确答案: C
    解析: 暂无解析

  • 第10题:

    单选题
    The EMPLOYEES table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) COMMISSION_PCT NUMBER (6) You need to write a query that will produce these results: 1. Display the salary multiplied by the commission_pct. 2. Exclude employees with a zero commission_pct. 3. Display a zero for employees with a null commission value. Evaluate the SQL statement: SELECT LAST_NAME, SALARY*COMMISSION_PCT FROM EMPLOYEES WHERE COMMISSION_PCT IS NOT NULL; What does the statement provide?()
    A

    All of the desired results

    B

    Two of the desired results

    C

    One of the desired results

    D

    An error statement


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; What is true about this SQL statement? ()
    A

    The SQL statement displays the desired results.

    B

    The column in the WHERE clause should be changed to display the desired results.

    C

    The operator in the WHERE clause should be changed to display the desired results.

    D

    The WHERE clause should be changed to use an outer join to display the desired results.


    正确答案: C
    解析: 暂无解析

  • 第12题:

    单选题
    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;


    正确答案: D
    解析: 暂无解析

  • 第13题:

    The EMPLOYEE tables has these columns: LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) COMMISSION_PCT NUMBER(5,2) You want to display the name and annual salary multiplied by the commission_pct for all employees. For records that have a NULL commission_pct, a zero must be displayed against the calculated column. Which SQL statement displays the desired results?()

    • A、SELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;
    • B、SELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;
    • C、SELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;
    • D、SELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;

    正确答案:D

  • 第14题:

    The EMPLOYEES table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) COMMISSION_PCT NUMBER (6) You need to write a query that will produce these results: 1. Display the salary multiplied by the commission_pct. 2. Exclude employees with a zero commission_pct. 3. Display a zero for employees with a null commission value. Evaluate the SQL statement: SELECT LAST_NAME, SALARY*COMMISSION_PCT FROM EMPLOYEES WHERE COMMISSION_PCT IS NOT NULL; What does the statement provide? ()

    • A、All of the desired results
    • B、Two of the desired results
    • C、One of the desired results
    • D、An error statement

    正确答案:C

  • 第15题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view? ()

    • A、SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal;
    • B、SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))
    • C、SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);
    • D、SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);

    正确答案:A

  • 第16题:

    Click the Exhibit button and examine the data in the EMPLOYEES table. Which three subqueries work?()

    • A、SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);
    • B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • C、SELECT distinct department_id FROM employees WHERE salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • D、SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • E、SELECT last_name FROM employees WHERE salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);
    • F、SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));

    正确答案:C,D,E

  • 第17题:

    The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; What is true about this SQL statement?()

    • A、The SQL statement displays the desired results.
    • B、The column in the WHERE clause should be changed to display the desired results.
    • C、The operator in the WHERE clause should be changed to display the desired results.
    • D、The WHERE clause should be changed to use an outer join to display the desired results.

    正确答案:C

  • 第18题:

    Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()

    • A、SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);
    • B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);
    • C、SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);
    • D、SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);
    • E、SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);
    • F、SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

    正确答案:C,D,E

  • 第19题:

    单选题
    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

    randomly

    B

    ascending by date

    C

    descending by date

    D

    ascending alphabetically

    E

    descending alphabetically


    正确答案: A
    解析: 暂无解析

  • 第20题:

    单选题
    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;


    正确答案: B
    解析: 暂无解析

  • 第21题:

    单选题
    The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; What is true about this SQL statement? ()
    A

    The SQL statement displays the desired results.

    B

    The column in the WHERE clause should be changed to display the desired results.

    C

    The operator in the WHERE clause should be changed to display the desired results.

    D

    The WHERE clause should be changed to use an outer join to display the desired results.


    正确答案: B
    解析: 暂无解析

  • 第22题:

    单选题
    The EMP table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) DEPARTMENT_ID NUMBER (6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARTMENT_ID = NULL; What is true about this SQL statement ?()
    A

    The SQL statement displays the desired results.

    B

    The column in the WHERE clause should be changed to display the desired results.

    C

    The operator in the WHERE clause should be changed to display the desired results.

    D

    The WHERE clause should be changed to use an outer join to display the desired results.


    正确答案: C
    解析: 暂无解析

  • 第23题:

    单选题
    The EMPLOYEES table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) COMMISSION_PCT NUMBER (6) You need to write a query that will produce these results: 1. Display the salary multiplied by the commission_pct. 2. Exclude employees with a zero commission_pct. 3. Display a zero for employees with a null commission value. Evaluate the SQL statement: SELECT LAST_NAME, SALARY*COMMISSION_PCT FROM EMPLOYEES WHERE COMMISSION_PCT IS NOT NULL; What does the statement provide? ()
    A

    All of the desired results

    B

    Two of the desired results

    C

    One of the desired results

    D

    An error statement


    正确答案: B
    解析: 暂无解析