Chapter 5 (Final) Flashcards
(40 cards)
The DROP command deletes rows from a table individually or in groups.
False
If multiple Boolean operators are used in an SQL statement, NOT is evaluated first, then AND, then OR.
True
What will be returned when the following SQL statement is executed?
SELECT driver_no,count(*) as num_deliveries
FROM deliveries
GROUP BY driver_no;
A listing of each driver as well as the number of deliveries that he or she has made
Which of the following finds all groups meeting stated conditions?
HAVING
To eliminate duplicate rows in a query, the ________ qualifier is used in the SQL Select command.
DISTINCT
Given a table named store with 5 fields: store_id, address, city, state, zipcode, why would the following insert command not work?
INSERT INTO store values (‘234 Park Street’)
You must specify the fields to insert if you are only inserting some of the fields.
What does the following SQL statement do?
SELECT * From Customer WHERE Cust_Type = “Best”
Selects all the fields from the Customer table for each row with a customer labeled “Best”
Expressions are mathematical manipulations of data in a table that may be included as part of the SELECT statement.
True
The FROM clause is the first statement processed in an SQL command.
True
Adding the DISTINCT keyword to a query eliminates duplicates.
True
The main concept of relational databases was published in 1970 by:
E.F.Codd.
The DELETE TABLE DDL command is used to remove a table from the database.
False
The views are created by executing a CREATE VIEW SQL command.
True
Applications can be moved from one machine to another when each machine uses SQL.
True
SQL originated from a project called System-S.
False
The SQL command used to populate tables is the INSERT command.
True
In an SQL statement, which of the following parts states the conditions for row selection?
WHERE
The following query totals sales in state= ‘MA’ for each salesperson.
SELECT salesperson_id, sum(sales)
FROM salesperson
GROUP BY salesperson_id
HAVING state = ‘MA’;
False
The WHERE clause is always processed before the GROUP BY clause when both occur in a SELECT statement.
True
Which of the following counts ONLY rows that contain a value?
COUNT
Relational databases are heavily based on the mathematical concept of:
set theory
Which of the following is a purpose of the SQL standard?
To specify syntax and semantics of SQL data definition and manipulation languages
A catalog is the structure that contains object descriptions created by a user.
False
Implementation of a standard can never stifle creativity and innovation.
False