NAME

Question types


Start with


Question limit

of 80 available terms

Print test

80 True/False questions

  1. 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 (.)

          

  2. Microsoft Access does not support the ____ data type.
    A) DECIMAL
    B) CURRENCY
    C) CHAR
    D) INT
    A) True

          

  3. 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

          

  4. 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

          

  5. 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 (.)

          

  6. 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

          

  7. 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

          

  8. 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

          

  9. 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

          

  10. 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

          

  11. 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

          

  12. The UPPER function allows you to manipulate numeric data.
    A) True
    B) False
    A) True

          

  13. 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

          

  14. 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

          

  15. 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

          

  16. Which of the following deletes an index?
    A) DELETE INDEX
    B) REMOVE INDEX
    C) UNINDEX
    D) DROP INDEX
    D) DROP INDEX

          

  17. 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

          

  18. 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

          

  19. 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

          

  20. The following command will create a new MySQL user named tom.
    create user 'tom'@'localhost' identified by 'atc123';
    A) True
    B) False
    A) True

          

  21. You cannot use functions in WHERE clauses.
    A) True
    B) False
    B) False

          

  22. 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

          

  23. You can use the ____ command to create a new table.
    A) CREATE TABLE
    B) NEW TABLE
    C) UPDATE
    D) ALTER TABLE
    C) DROP TABLE

          

  24. In MySQL the __________ symbol is used as a wildcard in LIKE operations.
    A) %
    B) +
    C) CONCAT
    D) *
    B) UPPER

          

  25. 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

          

  26. 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.

          

  27. Which of the following commands executes a rollback?
    A) ROLLBACK TABLE;
    B) ROLLBACK;
    C) ROLLBACK ALL;
    D) ROLLBACK DB;
    D) DROP INDEX

          

  28. 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

          

  29. 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

          

  30. 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

          

  31. The product of two tables is formally called the ____ Product.
    A) Oracle
    B) Outer
    C) SQL
    D) Cartesian
    A) intersect

          

  32. 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

          

  33. A type of constraint supported in SQL is ____.
    A) grants
    B) foreign key
    C) indexes
    D) none of the above
    B) foreign key

          

  34. The command to delete a view is ____.
    A) DROP VIEW
    B) DELETE VIEW
    C) REMOVE VIEW
    D) REVOKE VIEW
    A) DROP VIEW

          

  35. 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

          

  36. Which of the following is a valid SQL command?
    A) COMMIT TABLE;
    B) COMMIT CHANGES;
    C) COMMIT DB;
    D) COMMIT;
    D) COMMIT

          

  37. 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

          

  38. 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

          

  39. To delete data from the database, use the ____ command.
    A) ROLLBACK
    B) COMMIT
    C) DELETE
    D) UPDATE
    C) DELETE

          

  40. 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

          

  41. 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

          

  42. 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

          

  43. 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

          

  44. You can join tables by using a condition in the _____ clause.
    A) FROM
    B) WHERE
    C) AND
    D) PLUS
    B) WHERE

          

  45. The system catalog is also called the ____.
    A) system database
    B) data dictionary
    C) master data table
    D) transaction database
    B) data dictionary

          

  46. 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

          

  47. Microsoft Access does not support COMMIT and ROLLBACK.
    A) True
    B) False
    A) Decimal

          

  48. 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

          

  49. To create a stored procedure in MySQL, use the ____________ command.
    A) CREATE ROUTINE
    B) CREATE SCRIPT
    C) CREATE PROCEDURE
    D) CALL
    B) False

          

  50. 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

          

  51. In SQL, use the ____ data type for character columns.
    A) INT
    B) VARCHAR
    C) VARIABLE
    D) CHARLENGTH
    B) VARCHAR

          

  52. 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

          

  53. 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

          

  54. 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

          

  55. 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

          

  56. You use aggregate functions to perform calculations based on groups of records .
    A) True
    B) False
    B) UPPER

          

  57. MySQL must update an index each time a (new) row of data is inserted into the corresponding table.
    A) True
    B) False
    A) True

          

  58. A function can have more than one argument.
    A) True
    B) False
    B) False

          

  59. You can use the DESC command in MySQL to display the columns of a view.
    A) True
    B) False
    A) True

          

  60. Indexes can only be created when the corresponding table is initially built.
    A) True
    B) False
    B) False

          

  61. The main mechanism for providing access to a database is the ____ command.
    A) PERMIT
    B) ACCESS
    C) GRANT
    D) REVOKE
    C) UPDATE

          

  62. 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

          

  63. In MySQL, the __________ function displays a value in all lowercase letters.
    A) REGULAR
    B) LOWER
    C) SMALL
    D) LCASE
    C) ROUND

          

  64. 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

          

  65. 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

          

  66. The privilege ____ can be granted to change the table structure.
    A) WRITE
    B) UPDATE
    C) ALTER
    D) MODIFY
    C) ALTER

          

  67. If a PRICE field value is 24.95, the function ROUND(PRICE,0) would result in 24.
    A) True
    B) False
    B) False

          

  68. 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

          

  69. To execute (run) a procedure in MySQL, use the EXEC command.
    A) True
    B) False
    B) False

          

  70. 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

          

  71. The privilege ____ can be granted to change data.
    A) WRITE
    B) UPDATE
    C) ALTER
    D) READ AND WRITE
    Correct Answer(s): B
    B) UPDATE

          

  72. 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

          

  73. 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

          

  74. 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

          

  75. Oracle and SQL Server support the ____ operator but Microsoft Access does not.
    A) UNION
    B) INTERSECT
    C) MINUS
    D) ALL
    B) intersect

          

  76. The ____ command is permanent.
    A) SELECT
    B) COMMIT
    C) SAVE
    D) AND
    B) COMMIT

          

  77. In a MySQL procedure, procedural code appears between the BEGIN and END commands/statements.
    A) True
    B) False
    A) True

          

  78. 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

          

  79. To change rows for which a specific condition is true, use the ____ command
    A) CHANGE
    B) MODIFY
    C) UPDATE
    D) ALTER
    C) UPDATE

          

  80. In MySQL, the _________ function displays a value in all uppercase letters.
    A) CAPITOL
    B) UPPER
    C) LARGE
    D) UCASE
    B) UPPER