0% found this document useful (0 votes)
19 views5 pages

Document

hellodjwjwi

Uploaded by

Maricel Navarro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views5 pages

Document

hellodjwjwi

Uploaded by

Maricel Navarro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Display the employee id and the last name of every employee in the company whose salary is between

5000 to 10000. Display the output in a single column with the format 100 : King Label the column as
Employee

Select one:

a.

SELECT CONCAT(CONCAT(employee_id, ‘:’), last_name) AS Employee, salary FROM employees WHERE


salary >= 5000 AND salary <= 10000

b.

SELECT CONCAT(CONCAT(employee_id, ‘:’), last_name) AS Employee FROM employees WHERE salary >=
5000 AND salary <= 10000

c.

SELECT CONCAT(employee_id,last_name) AS Employee FROM employees WHERE salary >5000 AND


10000

d.

SELECT CONCAT(employee_id, ‘:’, last_name) AS Employee, salary FROM employees WHERE salary
BETWEEN 5000 TO 10000

Display part number description and warehouse number whose part number starts with letter K.

Select one:

a.

SELECT partnum, description, warehouse FROM parts WHERE partnum LIKE ‘K%’;

b.

SELECT * FROM parts WHERE partnum LIKE ‘K%’;

c.
SELECT partnumber, description, warehouse FROM parts WHERE partnum = LIKE ‘K%’;

d.

SELECT partnum, description, warehouse FROM parts WHERE partnum = LIKE ‘K%’;

e.

SELECT partnum, description, warehouse FROM parts WHERE partnum LIKE ‘*K*’;

f.

SELECT * FROM parts WHERE partnum LIKE ‘K_’;

g.

SELECT partnumber, description, warehouse FROM parts WHERE partnum LIKE ‘K*’;

Display the first 5 letter in the surname of all the employees whose firstname starts with letter ‘D’

Select one:

a.

SELECT SUBSTR(surname,1,5), first_name FROM employees WHERE first_name = ‘D’

b.

SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE SUBSTR(first_name,1,1) = ‘D’

c.

SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE first_name IN ‘D’

d.

SELECT SUBSTR(surname,1,5), first_name FROM employees WHERE SUBSTR(first_name,1,1) IN ‘D’


e.

SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE

Display all the employee’s id and salary whose annual salary is from 100,000 to 200,000. Arrange the
output by salary in descending order.

Select one:

a.

SELECT employee_id, salary FROM employees WHERE salary *12 >= 100000 AND salary *12 <= 200000
ORDER BY salary desc

b.

SELECT employee_id, salary, salary *12 FROM employees WHERE 12* salary = 100000 AND 12 *salary =
200000 ORDER BY salary

c.

SELECT employee_id, salary FROM employees WHERE salary >= 100000 AND salary <= 200000 ORDER BY
salary

d.

SELECT employee_id, salary FROM employees WHERE salary *12 >= 100000 AND salary *12 <= 200000
ORDER BY salary

Display employee’s name and id whose firstname starts with letter D and job id is SA_REP. Sort the
output by department.

Select one:

a.

SELECT employees FROM employee_id, first_name, last_name WHERE first_name LIKE ‘D%’ and job_id =
‘IT_PROG’ ORDER BY department_id
b.

SELECT employee_id, first_name, last_name FROM employees WHERE job_id = ‘IT_PROG’ OR first_name
LIKE ‘D%’ and ORDER BY department_id

c.

SELECT employee_id, first_name, last_name FROM employees WHERE first_name LIKE ‘D%’ and job_id =
‘IT_PROG’ ORDER BY department_id

d.

SELECT employee_id, first_name, last_name FROM employees ORDER BY department_id WHERE


first_name LIKE ‘D%’ and job_id = ‘IT_PROG’

e.

‘IT_PROG’ OR first_name LIKE ‘D%’ and ORDER BY department_id

Which of the following SELECT statement is the correct report that will rename the column DESCRIPTION
to TITLE, PARTNUM to ID and ONHAND to STOCK?

Select one:

a.

SELECT DESCRIPTION NEW AS TITLE, PARTNUM NEW AS ID, ONHAND NEW AS STOCK FROM PARTS;

b.

SELECT DESCRIPTION AS ‘TITLE’, PARTNUM AS ‘ID’, ONHAND AS ‘STOCK’ FROM PARTS;

c.

SELECT DESCRIPTION AS TITLE, PARTNUM AS ID, ONHAND AS STOCK FROM PART;

d.
SELECT DESCRIPTION RENAME AS TITLE, PARTNUM RENAME AS ID, ONHAND RENAME AS STOCK FROM
PARTS;

Which of the following is the correct report that will display the CLASS from table PARTS.

Select one:

a.

SELECT * CLASS FROM PARTS;

b.

SELECT CLASS FROM PARTS;

c.

SELECT CLASS AS CLASS FROM PARTS;

d.

SELECT ‘CLASS’ FROM PARTS;

You might also like