Midterm Exam Database Programming With SQL

Share Embed Donate


Short Description

mid...

Description

Midterm Exam Database Programming With SQL Section 1 (Answer all questions in this section) 1. The SELECT statement retrieves information from the database. In a SELECT statement, you can do all of the following EXCEPT: Mark for Review (1) Points Joining Selection Projection Manipulation (*) 2. In the default order of precedence, which operator would be evaluated first? Mark for Review (1) Points Multiplications and Divisions are at the same level and would be evaluated first based on left to right order (*) Subtractions and Additions are at the same level and would be evaluated first based on left to right order Divisions and Subtractions are at the same level and would be evaluated first based on left to right order  Additions and Multiplications are at the same level and would be evaluated first f irst based on left to right order 3. You cannot use computers unless you completely understand exactly how they work. True or False? Mark for Review (1) Points True False (*) 4. There is only one kind of software used by all computers. True or False? Review (1) Points True False (*)

Mark for

5. Databases are used in most countries and by most governments. Life, as we know it, would change drastically if we no longer had access to databases. True or False? Mark for Review (1) Points True (*) False Section 2 (Answer all questions in this section) 6. The EMPLOYEES table includes these columns: EMPLOYEE_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(15) NOT NULL FIRST_NAME VARCHAR2(10) NOT NULL HIRE_DATE DATE NOT NULL

You want to produce a report that provides the last names, first names, and hire dates of those employees who were hired between March 1, 2000, and August 30, 2000. Which statements can you issue to accomplish this task? Mark for Review (1) Points SELECT last_name, first_name, hire_date FROM employees  AND hire_date >= '01-Mar-2000' '01-Mar- 2000' and hire_date = '01-Mar-2000' and hire_date != >= (*) Section 3 (Answer all questions in this section) 12. What value will the following SQL statement return? SELECT employee_id FROM employees WHERE employee_id BETWEEN 100 AND 150 OR employee_id IN(119, 175, 205)  AND (employee_id BETWEEN BETW EEN 150 AND 200); Mark for Review (1) Points 200, 201, 202, 203, 204, 205, 206 100, 101, 102, 103, 104, 107, 124, 141, 142, 143, 144, 149 (*) 19 No rows will be returned 13. Which SELECT statement should you use to limit the display of product information to those products with a price of less than 50? Mark for Review (1) Points SELECT product_id, product_name FROM products WHERE price < 50; (*) SELECT product_id, product_name FROM products WHERE price
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF