# Select one a all of the choices b select from

• No School
• AA 1
• 20
• 100% (6) 6 out of 6 people found this document helpful

This preview shows page 4 - 8 out of 20 pages.

List all employees except for IT_PROG job id. Select one: a. All of the choices b. SELECT *FROM employees EXCEPT JOB_ID != 'IT_PROG' c. SELECT *FROM employees WHERE JOB_ID <> 'IT_PROG' d. SELECT *FROM employees WHERE JOB_ID NOT IN ('IT_PROG') Question 12 Question text Display the employee id, salary, number of years and the hiring date of every employee in the company. Select one: a. SELECT employee_id, salary, hire_date, hire_date /365 FROM employees; b. SELECT employee_id,salary, hire_date, hire_date- SYSDATE /365 FROM employees; c. SELECT employee_id, salary, hire_date, ROUND((SYSDATE - hire_date) /365,0) FROM employees;
Question 13 Question text Which of the following SQL command will display the summary table showing the total quantity on hand per class. Select one: a. SELECT class, TOTAL(onhand) AS "QTY ON HAND" FROM parts GROUP BY class, onhand b. SELECT class, sum(onhand) AS "QTY ON HAND" FROM parts GROUP BY class c. SELECT class, onhand AS "QTY ON HAND" FROM parts GROUP BY sum(onhand) d. SELECT class, sum(onhand) AS "QTY ON HAND" FROM parts GROUP BY onhand Question 14 Question text Which of the following SQL command will display all records with part number contains the number 9? Select one: a. SELECT * FROM parts WHERE partnum IN ('%9%') b. SELECT partnum FROM parts WHERE partnum BETWEEN = ‘%9%’ c. SELECT * from parts WHERE partnum LIKE '%9%' d. SELECT partnum FROM parts WHERE partnum = ‘%9%’ Question 15 Question text You want to display the employee's last name and date hired in year 2000 to2006 whose salary is above 5000. Which SQL statement give the required output? Select one: a. SELECT last_name, hire_date FROM employees WHERE hire_date>= TO_DATE('01-Jan-2006', 'DD-Mon-RR') AND hire_date<= TO_DATE('31-Dec-2006', 'DD- Mon-RR') AND salary > 5000;
b. SELECT last_name, hire_date FROM employees WHERE hire_date>= TO_DATE('01-Jan-2000', 'DD-Mon-YYYYY') AND hire_date<= TO_DATE('31-Dec-2006', 'DD-Mon-YYYY') AND salary ABOVE 5000; c. SELECT last_name, hire_date FROM employees WHERE hire_date>= TO_DATE('Jan-2000', 'Month-YYYY') AND hire_date<= TO_DATE('Dec-2006', 'Month-‘YYYY') AND salary > 5,000; d. SELECT last_name, hire_date FROM employees WHERE hire_date>= TO_DATE('2000', 'YYYY') AND hire_date<= TO_DATE('2006', 'YYYY') OR salary > 5000; Question 16 Question text The DBA will create a new user name sales. Which of the following SQL command will perform the creation? Select one: a. CREATE USER sales IDENTIFIED BY 1234 b. CREATE USER FR0M DB_USER SET user=’sales’ password=NULL c. None of the choices d. CREATE USERNAME sales SET PASSWORD default e. CREATE sales ACCESS 1234 Question 17 Question text Which of the following is a Data Definition Language? Select one: a. REVOKE b. DROP c. GRANT d. MERGE
e. COMMIT Question 18 Question text Display all the records in the employee table. Arrange the output in by lastname from A-Z order. Select one: a. SELECT * FROM employees SORT BY lastname ascending b. SELECT * FROM employees SORT BY lastname c. SELECT * FROM employees ORDER BY lastname d. SELECT * FROM employees ORDER BY lastname AZ Question 19 Question text Evaluate the following SQL command SELECT * FROM jobs WHERE job_title LIKE 'Manager%' Select one: a. No records will be displayed b. The SQL command will produce an error.