The EMP table contains these columns: LAST NAME VARCHAR2(25)

题目
单选题
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
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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


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

第2题:

单选题
The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(4) LAST_NAME VARCHAR2 (25) JOB_ID VARCHAR2(10) You want to search for strings that contain 'SA_' in the JOB_ID column. Which SQL statement do you use?()
A

SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA/_%' ESCAPE '/';

B

SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_';

C

SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_' ESCAPE /;

D

SELECT employee_id, last_name, job_id FROM employees WHERE job_id = '%SA_';


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

第3题:

单选题
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
解析: 暂无解析

第4题:

单选题
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
解析: 暂无解析

第5题:

多选题
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? ()
A

INSERT INTO employees VALUES (NULL, 'JOHN','Smith');

B

INSERT INTO employees( first_name, last_name) VALUES ('JOHN','Smith');

C

INSERT INTO employees VALUES ('1000','JOHN','NULL');

D

INSERT INTO employees(first_name,last_name, employee_id) VALUES ('1000, 'john','Smith');

E

INSERT INTO employees (employee_id) VALUES (1000);

F

INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'john',);


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

第6题:

单选题
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
解析: 暂无解析

第7题:

单选题
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE You issue these statements: CREATE table new_emp ( employee_id NUMBER, name VARCHAR2(30)); INSERT INTO new_emp SELECT employee_id , last_name from employees; Savepoint s1; UPDATE new_emp set name = UPPER(name); Savepoint s2; Delete from new_emp; Rollback to s2; Delete from new_emp where employee_id =180; UPDATE new_emp set name = 'James'; Rollback to s2; UPDATE new_emp set name = 'James' WHERE employee_id =180; Rollback; At the end of this transaction, what is true?()
A

You have no rows in the table.

B

You have an employee with the name of James.

C

You cannot roll back to the same savepoint more than once.

D

Your last update fails to update any rows because employee ID 180 was already deleted.


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

第8题:

单选题
Which SQL statement accepts user input for the columns to be displayed, the table name, and WHERE condition?()
A

SELECT &1, &2 FROM &3 WHERE last_name = '&8';

B

SELECT &1, '&2' FROM &3 WHERE '& last_name = '&8';

C

SELECT &1, &2 FROM &3 WHERE last_name = '&8';

D

SELECT &1, '&2' FROM EMP WHERE last_name = '&8';


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

第9题:

单选题
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE You issue these statements: CREATE table new_emp ( employe_id NUMBER, name VARCGAR2(30)); INSERT INTO new_emp SELECT employee_id, last_name from employees; Savepoint s1; UPDATE new_emp set name = UPPER(name); Savepoint s2; Delete from new_emp; Rollback to s2; Delete from new_emp where employee_id=180; UPDATE new_emp set name = 'James'; Rollback to s2; UPDATE new_emp sey name = 'James' Where employee_id=180; Rollback; At the end of this transaction, what is true?()
A

You have no rows in the table.

B

You have an employee with the name of James.

C

You cannot roll back to the same savepoint more than once.

D

Your last update fails to update any rows because employee ID 180 was already deleted.


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

第10题:

单选题
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
解析: 暂无解析