Database Systems: 11e Chapter 7
cascading
A multilevel ordered sequence is known as a ________ order sequence.
DROP
A table can be deleted from the database by using the ________ command.
alias
A(n) ________ is an alternate name given to a column or table in any SQL statement.
GROUP BY
Frequency distributions can be created quickly and easily using the ________ clause within the SELECT statement.
FORMAT
In Oracle, the ________ command is used to place a $ in front of a numeric value.
IN
Many queries that would require the use of the logical OR can be more easily handled with the help of the special operator ________.
COMMIT
Some RDBMSs (like Oracle) will automatically ________ data changes when issuing data definition commands.
UPDATE
The SQL command that enables you to make changes in the data is ________.
INSERT
The SQL command that lets you insert data into a table, one row at a time, is ________.
COMMIT
The SQL command that lets you save your work to disk is ________.
SELECT
The SQL command used to list the contents of a table is ________.
ALTER
The ________ command is used to modify the table structure by adding, removing, or renaming columns.
EXISTS
The ________ operator is used to check whether an attribute has a value.
IS NULL
The ________ operator is used to check whether an attribute value is null.
BETWEEN
The ________ operator is used to define a range limit.
LIKE
The ________ operator is used to find a character string that matches a given tring pattern.
AVG
The basic SQL aggregate function that gives the arithmetic mean for the specific column is ________.
COUNT
The basic SQL aggregate function that gives the number of rows containing non-null values for the given column is ________.
SUM
The basic SQL aggregate function that gives the total of all values for a selected attribute in a given column is ________.
SQL-2003
The current fully approved version of standard SQL prescribed by the American National Standards Institute is ________.
FROM
To join tables, you simply list the tables in the ________ clause of the SELECT statement.
SELECT * FROM PRODUCT;
To list all the contents of the PRODUCT table you would use ________.
SELECT DISTINCT V_CODE FROM PRODUCT;
What command is used to list a unique value for Vendor Code (V_CODE), where the list will produce only a list of those values that are different from one another?
all rows will be deleted
What happens when you issue the DELETE FROM tablename command without specifying a WHERE condition?
SELECT E.EMP_MGR, M.EMP_LNAME, E.EMP_NUM, E.EMP_LNAME FROM EMP E, EMP M WHERE E.EMP_MGR=M.EMP_NUM ORDER BY E.EMP_MGR;
What is an example of a recursive query?
SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE FROM EMPLOYEE ORDER BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
What is the SQL command to output the contents of the Employee table sorted by last name, first name, and initial?
SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE = 21344 OR V_CODE = 24288;
What is the SQL syntax to list the table contents for either V_CODE = 21344 or V_CODE = 24288?
SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE FROM PRODUCT, VENDOR WHERE PRODUCT.V_CODE = VENDOR.V_CODE; ORDER BY P_PRICE;
What is the command to join the P_DESCRIPT and P_PRICE fields from the PRODUCT table and the V_NAME, V_AREACODE, V_PHONE and V_CONTACT fields from the VENDOR table where the values of V_CODE match, and the output is ordered by P_PRICE?
SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE FROM PRODUCT, VENDOR WHERE PRODUCT.V_CODE = VENDOR.V_CODE;
What is the command to join the P_DESCRIPT and P_PRICE fields from the PRODUCT table and the V_NAME, V_AREACODE, V_PHONE and V_CONTACT fields from the VENDOR table where the values of V_CODE match?
SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT ORDER BY P_PRICE;
What is the command used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the PRODUCT table in ascending order by P_PRICE?
no aggregate function is used
What is wrong with the following query? SELECT V_CODE, P_CODE, P_DESCRIPT, P_PRICE FROM PRODUCT GROUP BY V_CODE;
when two columns with the same name are specified in the query
When must table names be used as a prefix for a column name?
HAVING
When using GROUP BY, ________ operates like the WHERE clause in the SELECT statement.
SELECT P_DESCRIPT, P_HAND, P_MIN, P_PRICE, P_INDATE FROM PRODUCT WHERE P_INDATE >= #20-JAN-08#;
Which MS Access query command will list all the rows in which the inventory stock dates occur on or after January 20, 2006?
ROLLBACK;
Which command is used to restore the table contents?
SELECT columnlist FROM tablelist [WHERE conditionlist];
Which command is used to select partial table contents?
SELECT P_DESCRIPT, P_QOH, P_PRICE,P_QOH*P_PRICE AS TOTVALUE FROM PRODUCT;
Which command uses columns and column aliases to determine the total value of each of the products held on hand and displays the results in a column labeled TOTVALUE?
UPDATE PRODUCT SET P_INDATE = '18-JAN-2008' WHERE P_CODE = '13-Q2/P2';
Which command would you use when changing the date in the PRODUCT table?
SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE <=21344;
Which query would be used to output the table contents where the value of V_CODE is less than or equal to 21344?
SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE <> 21344;
Which query would be used to output the table contents where the value of V_CODE is not equal to 21344?
SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE FROM PRODUCT WHERE P-CODE = '1558-QW1';
Which query would be used to output the table contents where the value of the character field P_CODE is 1558-QW1?
SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE = 21344;
Which query would be used to output the table contents where the value of V_CODE is equal to 21344?
CHAR & VARCHAR2
________ is/are SQL character data type(s).
MAX
he ________ function is used to find the highest value in a table column.