Deck 5: Beginning Structured Query Language Sql

Full screen (f)
exit full mode
Question
Entity integrity is enforced automatically when the primary key is specified in the CREATE TABLE command sequence.
Use Space or
up arrow
down arrow
to flip the card.
Question
The ANSI SQL standards are also accepted by the ISO.
Question
SQL requires the use of the ADD command to enter data into a table.
Question
Only numeric data types can be added and subtracted in SQL.
Question
The COMMIT command does not permanently save all changes. In order to do that, you must use SAVE.
Question
You cannot insert a row containing a null attribute value using SQL.
Question
If you have not yet used the COMMIT command to store the changes permanently in the database, you can restore the database to its previous condition with the ROLLBACK command.
Question
Since computers identify all characters by their numeric codes, mathematical operators cannot be used to place restrictions on character-based attributes.
Question
The ANSI prescribes a standard SQL-the current fully approved version is known as SQL-07.
Question
All SQL commands must be issued on a single line.
Question
Oracle users can use the Access QBE (query by example) query generator.
Question
A database language enables the user to perform complex queries designed to transform the raw data into useful information.
Question
Any changes made to the contents of a table are not physically saved on disk until you use the SAVE command.
Question
Although SQL commands can be grouped together on a single line, complex command sequences are best shown on separate lines, with space between the SQL command and the command's components.
Question
Data type selection is usually dictated by the nature of the data and by the intended use.
Question
You can select partial table contents by naming the desired fields and by placing restrictions on the rows to be included in the output.
Question
The CHECK constraint is used to define a condition for the values that the attribute domain cannot have.
Question
To list the contents of a table, you must use the DISPLAY command.
Question
A database language enables the user to create database and table structures to perform basic data management chores.
Question
SQL is considered difficult to learn; its command set has a vocabulary of more than 300 words.
Question
The SQL command that lets you permanently save data changes is ____.

A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Question
The most recent fully approved version of standard SQL prescribed by the ANSI is ____.

A) SQL-99
B) SQL-2003
C) SQL-4
D) SQL-07
Question
Some RDBMSs, such as Microsoft Access, automatically make the necessary conversions to eliminate case sensitivity.
Question
The SQL command that modifies an attribute's values in one or more table's rows is ____.

A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Question
Date procedures are often more software-specific than other SQL procedures.
Question
String comparisons are made from left to right.
Question
To list all the contents of the PRODUCT table, you would use ____.

A) LIST * FROM PRODUCT;
B) SELECT * FROM PRODUCT;
C) DISPLAY * FROM PRODUCT;
D) SELECT ALL FROM PRODUCT;
Question
To join tables, simply enumerate the tables in the FROM clause of the SELECT statement. The DBMS will create a Cartesian product of every table in the FROM clause. To get the correct results, you need to select the rows in which the common attribute values do not match.
Question
Most SQL implementations yield case-insensitive searches.
Question
The SQL command that lets you insert rows into a table is ____.

A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Question
The conditional LIKE must be used in conjunction with wildcard characters.
Question
SQL allows the use of logical restrictions on its inquiries such as OR, AND, and NOT.
Question
ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause.
Question
UPDATE tablename *****
[WHERE conditionlist];
The ____ command replaces the ***** in the syntax of the UPDATE command, shown above.

A) SET columnname = expression
B) columnname = expression
C) expression = columnname
D) LET columnname = expression
Question
The COUNT function is designed to tally the number of non-null "values" of an attribute, and is often used in conjunction with the DISTINCT clause.
Question
In Oracle, the ____ command is used to change the display for a column, for example, to place a $ in front of a numeric value.

A) DISPLAY
B) FORMAT
C) CHAR
D) CONVERT
Question
When joining three or more tables, you need to specify a join condition for one pair of tables.
Question
The SQL character data format(s) is(are) ____.

A) CHAR and VARCHAR
B) VARCHAR only
C) Alphanumeric
D) CHAR only
Question
The SQL command that lets you select attributes from rows in one or more tables is ____.

A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Question
An example of a command you would use when making changes to a PRODUCT table is ____.

A) CHANGE PRODUCT
SET P_INDATE = '18-JAN-2004'
WHERE P_CODE = '13-Q2/P2';
B) ROLLBACK PRODUCT
SET P_INDATE = '18-JAN-2004'
WHERE P_CODE = '13-Q2/P2';
C) EDIT PRODUCT
SET P_INDATE = '18-JAN-2004'
WHERE P_CODE = '13-Q2/P2';
D) UPDATE PRODUCT
SET P_INDATE = '18-JAN-2004'
WHERE P_CODE = '13-Q2/P2';
Question
To delete a row from the PRODUCT table, use the ____ command.

A) COMMIT
B) DELETE
C) ERASE
D) KILL
Question
The special operator used to check whether an attribute value is within a range of values is ____.

A) BETWEEN
B) NULL
C) LIKE
D) IN
Question
Some RDBMSs, such as Oracle, automatically ____ data changes when issuing data definition commands.

A) COMMIT
B) ROLLBACK
C) UNSAVE
D) UPDATE
Question
A(n) ____ is a query that is embedded (or nested) inside another query.

A) alias
B) operator
C) subquery
D) view
Question
The special operator used to check for similar character strings is ____.

A) BETWEEN
B) IS NULL
C) LIKE
D) IN
Question
The ____ special operator is used to check whether an attribute value is null.

A) BETWEEN
B) IS NULL
C) LIKE
D) IN
Question
The special operator used to check whether a subquery returns any rows is ____.

A) BETWEEN
B) EXISTS
C) LIKE
D) IN
Question
The ____ command would be used to delete the table row where the P_CODE is 'BRT-345'.

A) DELETE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
B) REMOVE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
C) ERASE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
D) ROLLBACK FROM PRODUCT
WHERE P_CODE = 'BRT-345';
Question
Which of the following is used to select partial table contents?

A) SELECT
FROM
BY ;
B) LIST
FROM

BY ;
C) SELECT
FROM

WHERE ;
D) LIST
FROM

WHERE ;
Question
Which query will use the given columns and column aliases from the PRODUCT table to determine the total value of inventory held on hand and display the results in a column labeled TOTVALUE?

A) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICE AS TOTVALUE
FROM PRODUCT;
B) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH=P_PRICE AS TOTVALUE
FROM PRODUCT;
C) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH/P_PRICE AS TOTVALUE
FROM PRODUCT;
D) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH-P_PRICE AS TOTVALUE
FROM PRODUCT;
Question
Which query will output the table contents when the value of the character field P_CODE is alphabetically less than 1558-QW1?

A) SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE <'1558-QW1';
B) SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE = [1558-QW1]
C) SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE = (1558-QW1)
D) SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE = {1558-QW1}
Question
Which query will output the table contents when the value of P_PRICE is less than or equal to 10?

A) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_PRICE <> 10;
B) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_PRICE <= 10;
C) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_PRICE => 10;
D) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_PRICE = 10;
Question
A(n) ____ is an alternate name given to a column or table in any SQL statement.

A) alias
B) data type
C) stored function
D) trigger
Question
Which query uses the correct SQL syntax to list the table contents for either V_CODE = 21344 or V_CODE = 24288?

A) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344
OR V_CODE <= 24288
B) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344
OR V_CODE => 24288
C) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344
OR V_CODE > 24288
D) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344
OR V_CODE = 24288
Question
Which query will use the given columns and column aliases from the PRODUCT table to determine the total value of inventory held on hand?

A) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH/P_PRICE
FROM PRODUCT;
B) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH=P_PRICE
FROM PRODUCT;
C) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICE
FROM PRODUCT;
D) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH-P_PRICE
FROM PRODUCT;
Question
Which query will list all the rows in which the inventory stock dates occur on or after January 20, 2010?

A) SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE
FROM PRODUCT
WHERE P_INDATE >= '20-JAN-2010'
B) SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE
FROM PRODUCT
WHERE P_INDATE >= $20-JAN-2010$
C) SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE
FROM PRODUCT
WHERE P_INDATE <= '20-JAN-2010'
D) SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE
FROM PRODUCT
WHERE P_INDATE >= {20-JAN-2010}
Question
When you issue the DELETE FROM tablename command without specifying a WHERE condition, ____.

A) no rows will be deleted
B) the first row will be deleted
C) the last row will be deleted
D) all rows will be deleted
Question
Which query will output the table contents when the value of V_CODE is equal to 21344?

A) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <> 21344;
B) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <= 21344;
C) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344;
D) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE => 21344;
Question
The ____ command is used to restore the table's contents to their previous values.

A) COMMIT; RESTORE;
B) COMMIT; BACKUP;
C) COMMIT; ROLLBACK;
D) ROLLBACK;
Question
Which query will output the table contents when the value of V_CODE is not equal to 21344?

A) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <> 21344;
B) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <= 21344;
C) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344;
D) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE => 21344;
Question
The SQL aggregate function that gives the number of rows containing non-null values for the given column is ____.

A) COUNT
B) MIN
C) MAX
D) SUM
Question
Using the ____________________ command, SQL indexes can be created on the basis of any selected attribute.
Question
The SQL aggregate function that gives the total of all values for a selected attribute in a given column is ____.

A) COUNT
B) MIN
C) MAX
D) SUM
Question
The ____ command is used with the ALTER TABLE command to modify the table by deleting a column.

A) DROP
B) REMOVE
C) DELETE
D) ERASE
Question
In a 1:M relationship, you must always create the table for the ____________________ side first.
Question
The SQL query to output the contents of the EMPLOYEE table sorted by last name, first name, and initial is ____.

A) SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
LIST BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
B) SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
ORDER BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
C) SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
DISPLAY BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
D) SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
SEQUENCE BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
Question
The query 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 the price is ____.

A) 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;
B) 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;
C) 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;
D) 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;
Question
A table can be deleted from the database by using the ____ command.

A) DROP TABLE
B) DELETE TABLE
C) MODIFY TABLE
D) ERASE TABLE
Question
If your integer values are relatively small, use ____________________ instead of INT.
Question
DATE() and SYSDATE are special functions that return today's date in MS Access and ____________________, respectively.
Question
A(n) ____________________ is a logical group of database objects, such as tables and indexes, that are related to each other.
Question
The query used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the PRODUCT table in ascending order by P_PRICE is ____.

A) SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
FROM PRODUCT
SEQUENCE BY P_PRICE;
B) SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
FROM PRODUCT
LIST BY P_PRICE;
C) SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
FROM PRODUCT
ORDER BY P_PRICE;
D) SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
FROM PRODUCT
ASCENDING BY P_PRICE;
Question
____________________ words are words used by SQL to perform specific functions.
Question
The SQL aggregate function that gives the average for the specific column is ____.

A) COUNT
B) AVG
C) MAX
D) SUM
Question
Which query is used to list a unique value for V_CODE, where the list will produce only a list of those values that are different from one another?

A) SELECT ONLY V_CODE
FROM PRODUCT;
B) SELECT UNIQUE V_CODE
FROM PRODUCT;
C) SELECT DIFFERENT V_CODE
FROM PRODUCT;
D) SELECT DISTINCT V_CODE
FROM PRODUCT;
Question
In the SQL environment, the word ____________________ covers both questions and actions.
Question
The query 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 is ____.

A) SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE <> VENDOR.V_CODE;
B) SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE = VENDOR.V_CODE;
C) SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE <= VENDOR.V_CODE;
D) SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE => VENDOR.V_CODE;
Question
With the exception of the database ____________________ process, most RDBMS vendors use SQL that deviates little from the ANSI standard SQL.
Question
U.S. state abbreviations are always two characters, so ____________________(2) is a logical choice for the data type representing a state column.
Question
The basic SQL vocabulary has fewer than ____________________ words.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/100
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: Beginning Structured Query Language Sql
1
Entity integrity is enforced automatically when the primary key is specified in the CREATE TABLE command sequence.
True
2
The ANSI SQL standards are also accepted by the ISO.
True
3
SQL requires the use of the ADD command to enter data into a table.
False
4
Only numeric data types can be added and subtracted in SQL.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
5
The COMMIT command does not permanently save all changes. In order to do that, you must use SAVE.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
6
You cannot insert a row containing a null attribute value using SQL.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
7
If you have not yet used the COMMIT command to store the changes permanently in the database, you can restore the database to its previous condition with the ROLLBACK command.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
8
Since computers identify all characters by their numeric codes, mathematical operators cannot be used to place restrictions on character-based attributes.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
9
The ANSI prescribes a standard SQL-the current fully approved version is known as SQL-07.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
10
All SQL commands must be issued on a single line.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
11
Oracle users can use the Access QBE (query by example) query generator.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
12
A database language enables the user to perform complex queries designed to transform the raw data into useful information.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
13
Any changes made to the contents of a table are not physically saved on disk until you use the SAVE command.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
14
Although SQL commands can be grouped together on a single line, complex command sequences are best shown on separate lines, with space between the SQL command and the command's components.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
15
Data type selection is usually dictated by the nature of the data and by the intended use.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
16
You can select partial table contents by naming the desired fields and by placing restrictions on the rows to be included in the output.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
17
The CHECK constraint is used to define a condition for the values that the attribute domain cannot have.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
18
To list the contents of a table, you must use the DISPLAY command.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
19
A database language enables the user to create database and table structures to perform basic data management chores.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
20
SQL is considered difficult to learn; its command set has a vocabulary of more than 300 words.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
21
The SQL command that lets you permanently save data changes is ____.

A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
22
The most recent fully approved version of standard SQL prescribed by the ANSI is ____.

A) SQL-99
B) SQL-2003
C) SQL-4
D) SQL-07
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
23
Some RDBMSs, such as Microsoft Access, automatically make the necessary conversions to eliminate case sensitivity.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
24
The SQL command that modifies an attribute's values in one or more table's rows is ____.

A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
25
Date procedures are often more software-specific than other SQL procedures.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
26
String comparisons are made from left to right.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
27
To list all the contents of the PRODUCT table, you would use ____.

A) LIST * FROM PRODUCT;
B) SELECT * FROM PRODUCT;
C) DISPLAY * FROM PRODUCT;
D) SELECT ALL FROM PRODUCT;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
28
To join tables, simply enumerate the tables in the FROM clause of the SELECT statement. The DBMS will create a Cartesian product of every table in the FROM clause. To get the correct results, you need to select the rows in which the common attribute values do not match.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
29
Most SQL implementations yield case-insensitive searches.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
30
The SQL command that lets you insert rows into a table is ____.

A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
31
The conditional LIKE must be used in conjunction with wildcard characters.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
32
SQL allows the use of logical restrictions on its inquiries such as OR, AND, and NOT.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
33
ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
34
UPDATE tablename *****
[WHERE conditionlist];
The ____ command replaces the ***** in the syntax of the UPDATE command, shown above.

A) SET columnname = expression
B) columnname = expression
C) expression = columnname
D) LET columnname = expression
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
35
The COUNT function is designed to tally the number of non-null "values" of an attribute, and is often used in conjunction with the DISTINCT clause.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
36
In Oracle, the ____ command is used to change the display for a column, for example, to place a $ in front of a numeric value.

A) DISPLAY
B) FORMAT
C) CHAR
D) CONVERT
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
37
When joining three or more tables, you need to specify a join condition for one pair of tables.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
38
The SQL character data format(s) is(are) ____.

A) CHAR and VARCHAR
B) VARCHAR only
C) Alphanumeric
D) CHAR only
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
39
The SQL command that lets you select attributes from rows in one or more tables is ____.

A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
40
An example of a command you would use when making changes to a PRODUCT table is ____.

A) CHANGE PRODUCT
SET P_INDATE = '18-JAN-2004'
WHERE P_CODE = '13-Q2/P2';
B) ROLLBACK PRODUCT
SET P_INDATE = '18-JAN-2004'
WHERE P_CODE = '13-Q2/P2';
C) EDIT PRODUCT
SET P_INDATE = '18-JAN-2004'
WHERE P_CODE = '13-Q2/P2';
D) UPDATE PRODUCT
SET P_INDATE = '18-JAN-2004'
WHERE P_CODE = '13-Q2/P2';
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
41
To delete a row from the PRODUCT table, use the ____ command.

A) COMMIT
B) DELETE
C) ERASE
D) KILL
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
42
The special operator used to check whether an attribute value is within a range of values is ____.

A) BETWEEN
B) NULL
C) LIKE
D) IN
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
43
Some RDBMSs, such as Oracle, automatically ____ data changes when issuing data definition commands.

A) COMMIT
B) ROLLBACK
C) UNSAVE
D) UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
44
A(n) ____ is a query that is embedded (or nested) inside another query.

A) alias
B) operator
C) subquery
D) view
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
45
The special operator used to check for similar character strings is ____.

A) BETWEEN
B) IS NULL
C) LIKE
D) IN
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
46
The ____ special operator is used to check whether an attribute value is null.

A) BETWEEN
B) IS NULL
C) LIKE
D) IN
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
47
The special operator used to check whether a subquery returns any rows is ____.

A) BETWEEN
B) EXISTS
C) LIKE
D) IN
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
48
The ____ command would be used to delete the table row where the P_CODE is 'BRT-345'.

A) DELETE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
B) REMOVE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
C) ERASE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
D) ROLLBACK FROM PRODUCT
WHERE P_CODE = 'BRT-345';
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
49
Which of the following is used to select partial table contents?

A) SELECT
FROM
BY ;
B) LIST
FROM

BY ;
C) SELECT
FROM

WHERE ;
D) LIST
FROM

WHERE ;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
50
Which query will use the given columns and column aliases from the PRODUCT table to determine the total value of inventory held on hand and display the results in a column labeled TOTVALUE?

A) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICE AS TOTVALUE
FROM PRODUCT;
B) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH=P_PRICE AS TOTVALUE
FROM PRODUCT;
C) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH/P_PRICE AS TOTVALUE
FROM PRODUCT;
D) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH-P_PRICE AS TOTVALUE
FROM PRODUCT;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
51
Which query will output the table contents when the value of the character field P_CODE is alphabetically less than 1558-QW1?

A) SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE <'1558-QW1';
B) SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE = [1558-QW1]
C) SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE = (1558-QW1)
D) SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE = {1558-QW1}
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
52
Which query will output the table contents when the value of P_PRICE is less than or equal to 10?

A) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_PRICE <> 10;
B) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_PRICE <= 10;
C) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_PRICE => 10;
D) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_PRICE = 10;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
53
A(n) ____ is an alternate name given to a column or table in any SQL statement.

A) alias
B) data type
C) stored function
D) trigger
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
54
Which query uses the correct SQL syntax to list the table contents for either V_CODE = 21344 or V_CODE = 24288?

A) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344
OR V_CODE <= 24288
B) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344
OR V_CODE => 24288
C) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344
OR V_CODE > 24288
D) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344
OR V_CODE = 24288
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
55
Which query will use the given columns and column aliases from the PRODUCT table to determine the total value of inventory held on hand?

A) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH/P_PRICE
FROM PRODUCT;
B) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH=P_PRICE
FROM PRODUCT;
C) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICE
FROM PRODUCT;
D) SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH-P_PRICE
FROM PRODUCT;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
56
Which query will list all the rows in which the inventory stock dates occur on or after January 20, 2010?

A) SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE
FROM PRODUCT
WHERE P_INDATE >= '20-JAN-2010'
B) SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE
FROM PRODUCT
WHERE P_INDATE >= $20-JAN-2010$
C) SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE
FROM PRODUCT
WHERE P_INDATE <= '20-JAN-2010'
D) SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE
FROM PRODUCT
WHERE P_INDATE >= {20-JAN-2010}
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
57
When you issue the DELETE FROM tablename command without specifying a WHERE condition, ____.

A) no rows will be deleted
B) the first row will be deleted
C) the last row will be deleted
D) all rows will be deleted
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
58
Which query will output the table contents when the value of V_CODE is equal to 21344?

A) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <> 21344;
B) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <= 21344;
C) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344;
D) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE => 21344;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
59
The ____ command is used to restore the table's contents to their previous values.

A) COMMIT; RESTORE;
B) COMMIT; BACKUP;
C) COMMIT; ROLLBACK;
D) ROLLBACK;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
60
Which query will output the table contents when the value of V_CODE is not equal to 21344?

A) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <> 21344;
B) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <= 21344;
C) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344;
D) SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE => 21344;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
61
The SQL aggregate function that gives the number of rows containing non-null values for the given column is ____.

A) COUNT
B) MIN
C) MAX
D) SUM
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
62
Using the ____________________ command, SQL indexes can be created on the basis of any selected attribute.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
63
The SQL aggregate function that gives the total of all values for a selected attribute in a given column is ____.

A) COUNT
B) MIN
C) MAX
D) SUM
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
64
The ____ command is used with the ALTER TABLE command to modify the table by deleting a column.

A) DROP
B) REMOVE
C) DELETE
D) ERASE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
65
In a 1:M relationship, you must always create the table for the ____________________ side first.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
66
The SQL query to output the contents of the EMPLOYEE table sorted by last name, first name, and initial is ____.

A) SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
LIST BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
B) SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
ORDER BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
C) SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
DISPLAY BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
D) SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
SEQUENCE BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
67
The query 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 the price is ____.

A) 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;
B) 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;
C) 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;
D) 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;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
68
A table can be deleted from the database by using the ____ command.

A) DROP TABLE
B) DELETE TABLE
C) MODIFY TABLE
D) ERASE TABLE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
69
If your integer values are relatively small, use ____________________ instead of INT.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
70
DATE() and SYSDATE are special functions that return today's date in MS Access and ____________________, respectively.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
71
A(n) ____________________ is a logical group of database objects, such as tables and indexes, that are related to each other.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
72
The query used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the PRODUCT table in ascending order by P_PRICE is ____.

A) SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
FROM PRODUCT
SEQUENCE BY P_PRICE;
B) SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
FROM PRODUCT
LIST BY P_PRICE;
C) SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
FROM PRODUCT
ORDER BY P_PRICE;
D) SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
FROM PRODUCT
ASCENDING BY P_PRICE;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
73
____________________ words are words used by SQL to perform specific functions.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
74
The SQL aggregate function that gives the average for the specific column is ____.

A) COUNT
B) AVG
C) MAX
D) SUM
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
75
Which query is used to list a unique value for V_CODE, where the list will produce only a list of those values that are different from one another?

A) SELECT ONLY V_CODE
FROM PRODUCT;
B) SELECT UNIQUE V_CODE
FROM PRODUCT;
C) SELECT DIFFERENT V_CODE
FROM PRODUCT;
D) SELECT DISTINCT V_CODE
FROM PRODUCT;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
76
In the SQL environment, the word ____________________ covers both questions and actions.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
77
The query 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 is ____.

A) SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE <> VENDOR.V_CODE;
B) SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE = VENDOR.V_CODE;
C) SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE <= VENDOR.V_CODE;
D) SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE => VENDOR.V_CODE;
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
78
With the exception of the database ____________________ process, most RDBMS vendors use SQL that deviates little from the ANSI standard SQL.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
79
U.S. state abbreviations are always two characters, so ____________________(2) is a logical choice for the data type representing a state column.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
80
The basic SQL vocabulary has fewer than ____________________ words.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 100 flashcards in this deck.