5370 Quiz 5
Which of the following is the wildcard operator in SQL statements?
*
What does the following SQL statement do? UPDATE Product_T SET Unit_Price = 775 WHERE Product_ID = 7
Changes the unit price of Product 7 to 775
_____ is a set of commands used to update and query a database.
DML
The first part of an SQL query to be read is the _____ statement.
FROM
SQL originated from a project called System-S.
False
Which of the following questions is answered by the SQL statement? SELECT COUNT (Product_Description) FROM Product_T;
How many products have product descriptions in the Product Table?
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"
An INSERT command does not need to have the fields listed.
True
In order to update data in SQL, one must inform the DBMS which relation, columns, and rows are involved.
True
Some DBMS can handle graphic data types as well as text and numbers.
True
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.
A single value returned from an SQL query that includes an aggregate function is called a(n):
scalar aggregate
The main concept of relational databases was published in 1970 by:
E.F. Codd.
Implementation of a standard can never stifle creativity and innovation.
False
When creating a table, it is not important to consider foreign key-primary key mates.
False
The ALTER TABLE command is used to change a table definition.
True
A view may not be updated directly if it contains:
the HAVING clause.
Multiple values returned from an SQL query that includes an aggregate function are called:
vector aggregates.
What does the following SQL statement do? ALTER TABLE Customer_T ADD (Type Varchar(2));
Alters the Customer_T table by adding a field called "Type"
A database is maintained and queried using the data mapping language (DML).
False
SQL has been implemented only in the mainframe and midrange environments.
False
The CREATE SCHEMA DDL command is used to create a table.
False
The DELETE TABLE DDL command is used to remove a table from the database.
False
The DROP command deletes rows from a table individually or in groups.
False
The ORDER BY clause is the first statement processed in an SQL command.
False
The following two SQL statements will produce different results.SELECT last_name, first_name FROM customer WHERE state = 'MA' OR state = 'NY' OR state = 'NJ' OR state = 'NH' OR state = 'CT'; SELECT last_name, first_name FROM customer WHERE state in ('MA','NY','NJ','NH','CT');
False
When the SELECT clause in the create view statement contains the keyword DISTINCT, the view can be used to update data.
False
A database table is defined using the data definition language (DDL).
True
The following query totals sales for each salesperson. SELECT salesperson_id, sum(sales) FROM salesperson GROUP BY salesperson_id;
True
The following two SQL statements will produce the same results. SELECT last_name, first_name FROM customer WHERE credit_limit > 99 AND credit_limit < 10001; SELECT last_name, first_name FROM customer WHERE credit_limit BETWEEN 100 and 10000;
True