Lesson 6 Fundamentals of SQL – Flashcards

Unlock all answers in this set

Unlock answers
question
A database language enables the user to create database and table structures to perform basic data management chores.
answer
True
question
A database language enables the user to perform complex queries designed to transform the raw data into useful information.
answer
True
question
The ANSI prescribes a standard SQL-the current fully approved version is known as SQL 07.
answer
False
question
The ANSI SQL standards are also accepted by the ISO.
answer
True
question
SQL is considered difficult to learn; its command set has a vocabulary of more than 300 words.
answer
False
question
The SQL command that allows a user to insert rows into a table is _____.
answer
INSERT
question
The SQL command that allows a user to permanently save data changes is _____.
answer
COMMIT
question
The SQL command that allows a user to list the contents of a table is _____.
answer
SELECT
question
The SQL data manipulation command HAVING:
answer
restricts the selection of grouped rows based on a condition.
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.
answer
True
question
Oracle users can use the Access QBE (query by example) query generator.
answer
False
question
Mathematical operators cannot be used to place restrictions on character-based attributes.
answer
False
question
String comparisons are made from left to right.
answer
True
question
Date procedures are often more software-specific than other SQL procedures.
answer
True
question
SQL allows the use of logical restrictions on its inquiries such as OR, AND, and NOT.
answer
True
question
ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause.
answer
True
question
The conditional LIKE must be used in conjunction with wildcard characters.
answer
False
question
Most SQL implementations yield case-insensitive searches.
answer
False
question
Some RDBMSs, such as Microsoft Access, automatically make the necessary conversions to eliminate case sensitivity.
answer
True
question
According to the rules of precedence, which of the following computations should be completed first?
answer
Performing operations within parentheses
question
The special operator used to check whether a subquery returns any rows is _____.
answer
EXISTS
question
The special operator used to check whether an attribute value matches a given string pattern is _____.
answer
Like
question
The _____ special operator is used to check whether an attribute value is null.
answer
IS NULL
question
The special operator used to check whether an attribute value is within a range of values is _____.
answer
BETWEEN
question
Which of the following queries uses the correct SQL syntax to list the table contents for either V_CODE = 21344 or V_CODE = 24288?
answer
SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE = 21344 OR V_CODE = 24288;
question
A(n) _____ is an alternate name given to a column or table in any SQL statement.
answer
alias
question
Which of the following queries will use the given columns and column aliases from the PRODUCT table to determine the total value of inventory held on hand?
answer
SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICE FROM PRODUCT;
question
Which of the following queries will list all the rows in which the inventory stock dates occur on or after January 20, 2010?
answer
SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATE FROM PRODUCT WHERE P_INDATE >= '20-JAN-2010';
question
Which of the following queries will output the table contents when the value of the character field P_CODE is alphabetically less than 1558-QW1?
answer
SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE FROM PRODUCT WHERE P_CODE <'1558-QW1';
question
Which of the following queries will output the table contents when the value of V_CODE is not equal to 21344?
answer
SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE 21344;
question
Which of the following queries will output the table contents when the value of V_CODE is equal to 21344?
answer
SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE = 21344;
question
Which of the following queries will output the table contents when the value of P_PRICE is less than or equal to 10?
answer
SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE P_PRICE <= 10;
question
Which of the following is used to select partial table contents?
answer
SELECT FROM WHERE ;
question
Which of the following queries 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?
answer
SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICE AS TOTVALUE FROM PRODUCT;
question
The SQL query to output the contents of the EMPLOYEE table sorted by last name, first name, and initial is_____.
answer
SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE FROM EMPLOYEE ORDER BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
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 _____.
answer
SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT ORDER BY P_PRICE;
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New