CoSci 186 Chapter 3

  1. A database must be shut down before the ALTER TABLE command can be executed.
    False
  2. You cannot specify the width for a(n) NUMBER column.
    False
  3. DML commands are used to create or modify database tables.
    False
  4. Data manipulation language commands are used to create or modify database tables.
    False
  5. The scale of a NUMBER column indicates the number of digits that can be displayed to the right of the decimal point.
    True
  6. The CREATE TABLE command cannot contain a subquery.
    False
  7. The scale of a NUMBER column indicates the total number of digits that can be stored in the column.
    False
  8. The TRUNCATE TABLE command can be used to delete a table from a database.
    False
  9. Seven bytes are allocated in a DATE column to store the century, year, month, day, hour, minute, and second of a date.
    True
  10. Every table name within a specific schema must be unique.
    True
  11. Using the DESC on a table will display hidden columns.
    False
  12. A table must contain a minimum of two columns.
    False
  13. A CHAR column cannot be resized to a width that is smaller than the data it already contains.
    True
  14. The width of a NUMBER column cannot be changed once it contains data.
    False
  15. The MODIFY TABLE command can be used to change the size of a table.
    False
  16. The MODIFY clause can be included in the ALTER TABLE command to add a default value to an existing column.
    True
  17. SELECT9 is a valid table name.
    True
  18. The default size of the CHAR column is 2.
    False
  19. DDL commands are used to create or modify database objects.
    True
  20. The maximum width of a VARCHAR2 column is 2000 characters.
    False
  21. The ALTER TABLE command can be used to rename a table.
    False
  22. A table name can be up to 30 characters in length.
    True
  23. A datatype identifies the type of data to be stored in a column.
    True
  24. More than one column can be changed at a time with the ALTER TABLE...MODIFY command.
    True
  25. Once a column as been set as UNUSED, it cannot be recovered.
    True
  26. If you are creating a new table containing four columns from an existing table and want to change the name of one of the columns when it is created in the new table, add a column list containing ____ names in the CREATE TABLE clause.



    D. four
  27. Which of the following datatypes refers to fixed-length character data, where n represents the maximum length of the column?



    C. CHAR(n)
  28. Which data dictionary object contains a column named HIDDEN_COLUMN?



    A. USER_TAB_COLS.
  29. Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column?



    C. MODIFY
  30. What is the maximum width that can be assigned to a DATE column?



    D. none of the above
  31. Which of the following keywords is used to remove a database table in Oracle 12c?



    A. DROP TABLE
  32. When modifying data in existing columns, which of the following is correct?



    B. A column must be as wide as the data it already contains.
  33. Which of the following SQL*Plus commands will display the structure of a table?



    A. DESC
  34. Which keywords are used to complete the deletion of a column previously marked with SET UNUSED?



    D. DROP UNUSED COLUMNS
  35. Which of the following commands will increase the size of the CITY column in the CUSTOMERS table from 12 to 20 and increase size of the LASTNAME column from 10 to 14?
    A. ALTER TABLE customers
        MODIFY (city VARCHAR2(+8),
        lastname VARCHAR2(+4));
    B. ALTER TABLE customers
        MODIFY (city (20), lastname (14));
    C. ALTER TABLE customers
        MODIFY (city VARCHAR2(20),
        lastname VARCHAR2(14));
    D. ALTER TABLE customers
        MODIFY (city (+8),
        lastname (+4));
    • C. ALTER TABLE customers
    •     MODIFY (city VARCHAR2(20),
    •     lastname VARCHAR2(14));
  36. When defining columns for a table, which of the following symbols is used to separate the column names in the column list?



    D. ,
  37. When creating a table, which of the following statements is correct?



    C. The column list must be enclosed in parentheses ( ).
  38. A _______ column generates values automatically at runtime and may reference values from other columns.



    C. Virtual
  39. Which of the following keywords cannot be used to modify an existing table?



    D. ALTER TABLE...AS
  40. Which of the following rules does not apply to column names in Oracle 12c?



    C. Column names can contain an ampersand (&).
  41. Which of the following is a valid column name?



    D. NEW_COLUMN
  42. If a new table is being created based upon a subquery, the subquery must be enclosed in which of the following symbols?



    C. ( )
  43. Once a column has been set as UNUSED, which of the following is correct?



    D. It is unavailable and will not be displayed in the table structure.
  44. Which of the following datatypes refers to variable-length character data, where n represents the maximum length of the column?



    B. VARCHAR2(n)
  45. When using the ALTER TABLE...DROP COLUMN command, which of the following is not correct?



    C. The command can be used to delete multiple columns from a table.
  46. Which of the following is displayed by the DESCRIBE command?



    D. all of the above
Author
Lencha
ID
324559
Card Set
CoSci 186 Chapter 3
Description
Chapter 2
Updated