CoSci 186 Chapter 3

Home > Preview

The flashcards below were created by user Lencha on FreezingBlue Flashcards.


  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.
    A. five
    B. zero
    C. four
    D. one
    C. four
    (this multiple choice question has been scrambled)
  27. Which of the following datatypes refers to fixed-length character data, where n represents the maximum length of the column?
    A. VARCHAR2(n)
    B. LONG
    C. CHAR(n)
    D. VARCHAR(n)
    C. CHAR(n)
    (this multiple choice question has been scrambled)
  28. Which data dictionary object contains a column named HIDDEN_COLUMN?
    A. USER_TABLES.
    B. USER_HIDE_COLS.
    C. USER_COLUMNS.
    D. USER_TAB_COLS.
    D. USER_TAB_COLS.
    (this multiple choice question has been scrambled)
  29. Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column?
    A. CHANGE
    B. RESET
    C. ADD
    D. MODIFY
    D. MODIFY
    (this multiple choice question has been scrambled)
  30. What is the maximum width that can be assigned to a DATE column?
    A. 1
    B. 8
    C. 12
    D. none of the above
    D. none of the above
  31. Which of the following keywords is used to remove a database table in Oracle 12c?
    A. DELETE TABLE
    B. ALTER TABLE...DROP
    C. DROP TABLE
    D. TRUNCATE TABLE
    C. DROP TABLE
    (this multiple choice question has been scrambled)
  32. When modifying data in existing columns, which of the following is correct?
    A. A column must be as wide as the data it already contains.
    B. Changing the default value of a column will change the values of data already in a table.
    C. If a NUMBER column is empty, its precision and scale cannot be changed.
    D. If a NUMBER column already contains data, its precision and scale can be decreased.
    A. A column must be as wide as the data it already contains.
    (this multiple choice question has been scrambled)
  33. Which of the following SQL*Plus commands will display the structure of a table?
    A. DSC
    B. DISPLAY
    C. VIEW
    D. DESC
    D. DESC
    (this multiple choice question has been scrambled)
  34. Which keywords are used to complete the deletion of a column previously marked with SET UNUSED?
    A. DROP SET COLUMNS
    B. UNSET UNUSED COLUMNS
    C. DROP UNUSED COLUMNS
    D. DELETE UNUSED COLUMNS
    C. DROP UNUSED COLUMNS
    (this multiple choice question has been scrambled)
  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?
    A. | |
    B. ( )
    C. ,
    D. " "
    C. ,
    (this multiple choice question has been scrambled)
  37. When creating a table, which of the following statements is correct?
    A. A user can have two tables with the same name, as long as the column names are different.
    B. Default values cannot be assigned to all columns in a table.
    C. The schema of the table must be explicitly stated.
    D. The column list must be enclosed in parentheses ( ).
    D. The column list must be enclosed in parentheses ( ).
    (this multiple choice question has been scrambled)
  38. A _______ column generates values automatically at runtime and may reference values from other columns.
    A. Virtual
    B. Static 
    C. Calculated 
    D. Automatic
    A. Virtual
    (this multiple choice question has been scrambled)
  39. Which of the following keywords cannot be used to modify an existing table?
    A. ALTER TABLE...ADD
    B. ALTER TABLE...DROP COLUMN
    C. ALTER TABLE...MODIFY
    D. ALTER TABLE...AS
    D. ALTER TABLE...AS
    (this multiple choice question has been scrambled)
  40. Which of the following rules does not apply to column names in Oracle 12c?
    A. Column names can be up to 30 characters in length.
    B. Column names can contain an ampersand (&).
    C. Column names must begin with a letter.
    D. Column names can contain numbers.
    B. Column names can contain an ampersand (&).
    (this multiple choice question has been scrambled)
  41. Which of the following is a valid column name?
    A. DISTINCT
    B. CHAR
    C. VARCHAR2
    D. NEW_COLUMN
    D. NEW_COLUMN
    (this multiple choice question has been scrambled)
  42. If a new table is being created based upon a subquery, the subquery must be enclosed in which of the following symbols?
    A. " "
    B. ' '
    C. | |
    D. ( )
    D. ( )
    (this multiple choice question has been scrambled)
  43. Once a column has been set as UNUSED, which of the following is correct?
    A. It is unavailable, but will still be displayed in the table structure.
    B. All DDL operations can be performed on it until it is actually dropped.
    C. It is unavailable and will not be displayed in the table structure.
    D. It will still appear in the results of subqueries until it is dropped.
    C. It is unavailable and will not be displayed in the table structure.
    (this multiple choice question has been scrambled)
  44. Which of the following datatypes refers to variable-length character data, where n represents the maximum length of the column?
    A. VARCHAR2(n)
    B. LONG
    C. CHAR(n)
    D. BFILE
    A. VARCHAR2(n)
    (this multiple choice question has been scrambled)
  45. When using the ALTER TABLE...DROP COLUMN command, which of the following is not correct?
    A. The command deletes both the column and its contents.
    B. The command's effect on the table is permanent.
    C. The command can be used to delete multiple columns from a table.
    D. You cannot delete the last remaining column in a table.
    C. The command can be used to delete multiple columns from a table.
    (this multiple choice question has been scrambled)
  46. Which of the following is displayed by the DESCRIBE command?
    A. column names
    B. not null requirements
    C. datatypes
    D. all of the above
    D. all of the above

Card Set Information

Author:
Lencha
ID:
324559
Filename:
CoSci 186 Chapter 3
Updated:
2016-11-18 09:13:59
Tags:
SQL Joan Casteel
Folders:
Co Sci 186
Description:
Chapter 2
Show Answers:

Home > Flashcards > Print Preview