Chapter 4 Quiz
The query displays the name of the employee (or employees) with the highest salary
What is the result of the following SQL query? SELECT ename FROM employee WHERE esalary = (SELECT MAX(salary) FROM employee); Select one: a. The query displays the number that represents how many employees share the highest salary b. The query displays the salary of the employee (or employees) with the highest salary c. The query displays the name and the salary of the employee (or employees) with the highest salary d. The query displays the name of the employee (or employees) with the highest salary
For each employee, the query will display the name and the salary increased by 10%
What is the result of the following SQL query? SELECT ename, esalary * 1.1 FROM employee; Select one: a. For each employee, the query will display the name, the salary, and all other columns from the table employee b. For each employee, the query will display the name, the salary, all other columns from the table employee, and the number 1.1 c. For each employee, the query will display the name and the salary increased by 10% d. For each employee, the query will display the name and 10% of the salary
The statement increases salary to 50,000 for each employee whose salary is below 50,000
What is the result of the following SQL statement? UPDATE employee SET salary = 50000 WHERE salary < 50000; Select one: a. The statement sets the salary for each employee to below 50,000 b. The statement sets the salary of each employee to 50,000 and ensures that the salary cannot drop below 50,000 c. The statement increases salary to 50,000 for each employee whose salary is below 50,000 d. The statement sets the salary of each employee to 50,000
DDL (Data Definition Language)
Which of the following is a part of a DDL statement? Select one: a. CREATE b. INSERT c. DELETE d. SELECT
SELECT
Which of the following is a part of a DML statement? Select one: a. CREATE b. ALTER c. DROP d. SELECT
SE_LECT
Which of the following is an invalid SQL keyword? Select one: a. Select b. SE_LECT c. selecT d. SeLeCt
SELECT *, FROM employee;
Which of the following is an invalid SQL statement? Select one: a. SELECT * FROM employee; b. SELECT * FROM employee; c. SELECT * FROM employee; d. SELECT *, FROM employee;
UPDATE
Which of the following statements would be used to change a value in a record of a table? Select one: a. CREATE TABLE b. ALTER TABLE c. INSERT INTO d. UPDATE
ALTER TABLE
Which of the following statements would be used to drop a column from the table? Select one: a. CREATE TABLE b. ALTER TABLE c. DROP TABLE d. UPDATE