
80 True/False questions
-
The CREATE VIEW command includes the words CREATE VIEW, followed by the name of the view, the word ____, and then a query.
A) AC
B) SA
C) AS
D) IN → B) period (.) -
Microsoft Access does not support the ____ data type.
A) DECIMAL
B) CURRENCY
C) CHAR
D) INT → A) True -
If you precede the subquery by the ____ operator, the condition is true only if it satisfies any value (one or more) produced by the subquery.
A) IS SOME
B) IS ANY
C) SOME
D) ANY → D) ANY -
Which of the following is a valid SQL command?
A) DROP TABLE LEVEL1_CUSTOMER;
B) DROP LEVEL1_CUSTOMER;
C) DELETE LEVEL1_CUSTOMER;
D) All of the above → D) COMMIT -
To qualify a column name, precede the name of the column with the name of the table, followed by a(n)_____.
A) comma (,)
B) period (.)
C) percent sign (%)
D) asterisk (*) → B) period (.) -
In MySQL, to add a specific number of months to a date, use the ___________ function.
A) DATE_ADD
B) ADD_DATE
C) ADD-MONTHS
D) CALC-MONTHS → C) ROUND -
If you have verified that the update you made is correct, you can use the ____ command to make the update permanent.
A) UPDATE
B) ROLLBACK
C) COMMIT
D) SAVE → A) CREATE UNIQUE INDEX -
To remove extra spaces to the right of a value, for example, the value in a FIRST_NAME column, use the _______ function.
A) TRUNCATE
B) TRIM_RIGHT
C) RIGHT
D) RTRIM → D) difference -
A(n) _________ is a procedure that is executed automatically in response to an associated database operation.
A) cursor
B) trigger
C) fetchpoint
D) read → B) trigger -
If you have not run the COMMIT command, executing the ____ command will reverse all updates made during the current work session.
A) UPDATE
B) REVERSE
C) ROLLBACK
D) ROLL → C) ROLLBACK -
The following command will run and display the SQL code used to create a view called patient_info.
SHOW SQL VIEW patient_info;
A) True
B) False → D) DELETE -
The UPPER function allows you to manipulate numeric data.
A) True
B) False → A) True -
A(n) ____ is an application program's or an individual user's picture of the database.
A) transaction
B) view
C) catalog
D) index → C) full outer -
If you specified ____ for a column when you created a table, then changing a value in a column to null is prohibited.
A) NOT NULL
B) NULL
C) CHAR
D) NUMBER → C) COMMIT -
When renaming columns using a CREATE VIEW command, you include the new column names in ____ following the name of the view.
A) single quotes
B) double quotes
C) parentheses
D) square brackets → C) parentheses -
Which of the following deletes an index?
A) DELETE INDEX
B) REMOVE INDEX
C) UNINDEX
D) DROP INDEX → D) DROP INDEX -
When you use a cursor in a procedure, the ____________ command advances the cursor to the next row in the set of rows retrieved by the query and places the contents of the row in the indicated variables.
A) RETRIEVE
B) FETCH
C) GET
D) READ → B) FETCH -
In MySQL, use the ________ function to truncate everything to the right of the decimal point.
A) TRUNCATE
B) LTRIM
C) REMOVE
D) TRIM → C) ROUND -
The ____ of two tables is a table containing every row that is in either the first table, the second table, or both tables.
A) intersection
B) union
C) minus
D) difference → A) union -
The following command will create a new MySQL user named tom.
create user 'tom'@'localhost' identified by 'atc123';
A) True
B) False → A) True -
You cannot use functions in WHERE clauses.
A) True
B) False → B) False -
Two tables are ____ compatible if they have the same number of columns and if their corresponding columns have identical data types and lengths.
A) union
B) minus
C) difference
D) intersect → B) MODIFY -
You can use the ____ command to create a new table.
A) CREATE TABLE
B) NEW TABLE
C) UPDATE
D) ALTER TABLE → C) DROP TABLE -
In MySQL the __________ symbol is used as a wildcard in LIKE operations.
A) %
B) +
C) CONCAT
D) * → B) UPPER -
PL/SQL, which was developed by Oracle as an extension of SQL, is an example of a procedural language.
A) True
B) False → B) trigger -
The database administrator uses the ____ command to revoke privileges from users.
A) DROP
B) REMOVE
C) REVOKE
D) CANCEL → B) All rows will be deleted from the table. -
Which of the following commands executes a rollback?
A) ROLLBACK TABLE;
B) ROLLBACK;
C) ROLLBACK ALL;
D) ROLLBACK DB; → D) DROP INDEX -
In a ____, all rows from the table on the left (the table listed first in the query) will be included regardless of whether they match rows from the table on the right (the table listed second in the query).
A) left inner join
B) left outer join
C) right inner join
D) right outer join → C) full outer -
The following statement does not contain syntax errors and is a valid SQL statement.
UPDATE ACCOUNTS
SET PAYMENT = PAYMENT * 1.02;
A) True
B) False → A) True -
When a subquery involves a table listed in the outer query, the subquery is called a(n) ____ subquery.
A) inner outer
B) correlated
C) reverse
D) parameter → C) database administrator -
The product of two tables is formally called the ____ Product.
A) Oracle
B) Outer
C) SQL
D) Cartesian → A) intersect -
To add data from an existing table to a new table, use a SELECT command in a(n) ____ command.
A) SET
B) ADD
C) INSERT
D) UPDATE → C) GRANT -
A type of constraint supported in SQL is ____.
A) grants
B) foreign key
C) indexes
D) none of the above → B) foreign key -
The command to delete a view is ____.
A) DROP VIEW
B) DELETE VIEW
C) REMOVE VIEW
D) REVOKE VIEW → A) DROP VIEW -
You can use the ____ clause of the ALTER TABLE command to change a column that currently rejects null values so that it will accept null values.
A) ADD
B) MODIFY
C) UPDATE
D) NULL → A) CREATE TABLE -
Which of the following is a valid SQL command?
A) COMMIT TABLE;
B) COMMIT CHANGES;
C) COMMIT DB;
D) COMMIT; → D) COMMIT -
In MySQL, you can use the _________ function to obtain today's date.
A) TODAYS_DATE
B) DATE_ADD
C) NOW-DATE
D) SYSDATE → D) SYSDATE -
The ____ of two tables is a table containing all rows that are in both tables.
A) intersect
B) union
C) difference
D) minus → A) intersect -
To delete data from the database, use the ____ command.
A) ROLLBACK
B) COMMIT
C) DELETE
D) UPDATE → C) DELETE -
In a ____, all rows from the table on the right will be included regardless of whether they match rows from the table on the left.
A) left inner join
B) left outer join
C) right outer join
D) right inner join → C) full outer -
The ____ of two tables is the set of all rows that are in the first table but that are not in the second table.
A) union
B) intersect
C) intersection
D) difference → D) difference -
What happens if you run a DELETE command that does not contain a WHERE clause?
A) The database will be deleted.
B) All rows will be deleted from the table.
C) All values would be replaced by nulls.
D) None of the above. → C) UPDATE -
In MySQL, use the ____ command to display the structure of a table.
A) SHOW TABLE
B) SHOW LAYOUT
C) DESC
D) DISPLAY LAYOUT → C) DESC -
You can join tables by using a condition in the _____ clause.
A) FROM
B) WHERE
C) AND
D) PLUS → B) WHERE -
The system catalog is also called the ____.
A) system database
B) data dictionary
C) master data table
D) transaction database → B) data dictionary -
You can use the ____ command to delete an entire table and its data.
A) ROLLBACK
B) DELETE TABLE
C) DROP TABLE
D) DELETE → A) True -
Microsoft Access does not support COMMIT and ROLLBACK.
A) True
B) False → A) Decimal -
When you specify a foreign key, the table referenced by the foreign key is the ____.
A) super
B) sibling
C) parent
D) child → B) correlated -
To create a stored procedure in MySQL, use the ____________ command.
A) CREATE ROUTINE
B) CREATE SCRIPT
C) CREATE PROCEDURE
D) CALL → B) False -
The correct command to allow user Thompson to delete rows in the CUSTOMER table would be:
GRANT ____ ON CUSTOMER TO THOMPSON.
A) DROP
B) REMOVE
C) UPDATE
D) DELETE → D) DELETE -
In SQL, use the ____ data type for character columns.
A) INT
B) VARCHAR
C) VARIABLE
D) CHARLENGTH → B) VARCHAR -
You can precede a subquery with the _____ operator to create a condition that is true if one or more rows are obtained when the subquery is executed.
A) IS NULL
B) IS TRUE
C) IS EXIST
D) EXISTS → D) EXISTS -
To ensure the uniqueness of values in a nonprimary key column, use the ____ command to create an index.
A) CREATE UNIQUE INDEX
B) CREATE NONPRIMARY INDEX
C) CREATE INDEX
D) CREATE ONLY INDEX → A) CREATE UNIQUE INDEX -
Which of the following joins compares the tables in the FROM clause and lists only those rows that satisfy the condition in the WHERE clause?
A) inner
B) outer
C) nested
D) product → A) inner -
If you precede the subquery by the ____ operator, the condition is true only if it satisfies all values produced by the subquery.
A) TRUE
B) ALL
C) IS ALL
D) ALWAYS → D) EXISTS -
You use aggregate functions to perform calculations based on groups of records .
A) True
B) False → B) UPPER -
MySQL must update an index each time a (new) row of data is inserted into the corresponding table.
A) True
B) False → A) True -
A function can have more than one argument.
A) True
B) False → B) False -
You can use the DESC command in MySQL to display the columns of a view.
A) True
B) False → A) True -
Indexes can only be created when the corresponding table is initially built.
A) True
B) False → B) False -
The main mechanism for providing access to a database is the ____ command.
A) PERMIT
B) ACCESS
C) GRANT
D) REVOKE → C) UPDATE -
For an SQL implementation to truly support the union operation, it must remove ____ rows automatically.
A) dependent
B) no
C) independent
D) duplicate → D) duplicate -
In MySQL, the __________ function displays a value in all lowercase letters.
A) REGULAR
B) LOWER
C) SMALL
D) LCASE → C) ROUND -
In a business organization, a person or an entire group known as the ____ is charged with managing the database.
A) process manager
B) developer
C) database administrator
D) programmer → C) database administrator -
You create an alias by typing the name of the table, pressing the ____, and then typing the name of the alias.
A) Tab
B) Backspace
C) Enter
D) Spacebar → A) DATE_ADD -
The privilege ____ can be granted to change the table structure.
A) WRITE
B) UPDATE
C) ALTER
D) MODIFY → C) ALTER -
If a PRICE field value is 24.95, the function ROUND(PRICE,0) would result in 24.
A) True
B) False → B) False -
When you need to complete tasks that are beyond the capabilities of SQL, you need to use a procedural language.
A) True
B) False → A) True -
To execute (run) a procedure in MySQL, use the EXEC command.
A) True
B) False → B) False -
To retrieve data from multiple tables in a query you can use the _____ operator with a subquery.
A) AND
B) IN
C) OR
D) NOT → A) CREATE UNIQUE INDEX -
The privilege ____ can be granted to change data.
A) WRITE
B) UPDATE
C) ALTER
D) READ AND WRITE
Correct Answer(s): B → B) UPDATE -
In a(n) ____ join, all rows from both tables are included regardless of whether they match rows from the other table.
A) normal
B) inner
C) full outer
D) combined → B) left outer join -
When using COMMIT and ROLLBACK, a(n) ____ can be viewed as a sequence of steps that accomplishes a single task.
A) procedure
B) transaction
C) program
D) method → B) False -
A(n) _________ is a pointer to a row in the collection of rows retrieved by an SQL command.
A) cursor
B) trigger
C) waypoint
D) fetchpoint → A) cursor -
Oracle and SQL Server support the ____ operator but Microsoft Access does not.
A) UNION
B) INTERSECT
C) MINUS
D) ALL → B) intersect -
The ____ command is permanent.
A) SELECT
B) COMMIT
C) SAVE
D) AND → B) COMMIT -
In a MySQL procedure, procedural code appears between the BEGIN and END commands/statements.
A) True
B) False → A) True -
In MySQL, use the __________ function to round a numeric value to a desired number of decimal places.
A) INT
B) INTEGER
C) ROUND
D) TRUNCATE → C) ROUND -
To change rows for which a specific condition is true, use the ____ command
A) CHANGE
B) MODIFY
C) UPDATE
D) ALTER → C) UPDATE -
In MySQL, the _________ function displays a value in all uppercase letters.
A) CAPITOL
B) UPPER
C) LARGE
D) UCASE → B) UPPER