โ† All SQL Flashcard Decks

Data Definition Language (DDL) Flashcards

7 cards from real SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Data Definition Language (DDL) flashcards as text
  1. Are DDL statements in most databases implicitly committed?

    Answer: Yes, most DDL auto-commits the current transaction

    In most RDBMSs, DDL statements cause an implicit commit, making the change permanent immediately.

  2. Which object does CREATE SEQUENCE generate?

    Answer: An object that produces a series of unique numeric values

    CREATE SEQUENCE defines a number generator commonly used to supply unique key values.

  3. What is the purpose of a temporary table created with CREATE TEMPORARY TABLE?

    Answer: It exists only for the session or transaction and is dropped automatically

    A temporary table lives only for the duration of the session or transaction and is then automatically removed.

  4. Which statement best describes the relationship between DDL and the data dictionary?

    Answer: DDL modifies the metadata describing database objects

    DDL commands update the data dictionary (system catalog) that stores definitions of database objects.

  5. What does ALTER TABLE ... DROP CONSTRAINT do?

    Answer: Removes a named constraint from the table

    DROP CONSTRAINT removes a specified constraint definition while leaving the table and its data intact.

  6. Which DDL command would you use to create a database object that enforces a value list like ('S','M','L')?

    Answer: A CHECK constraint or an ENUM/domain type

    A CHECK constraint (or an ENUM/domain in some systems) restricts a column to a defined set of allowed values.

  7. What distinguishes COMMENT ON (or column comments) as a DDL feature?

    Answer: It attaches descriptive metadata to database objects

    COMMENT ON adds human-readable documentation as metadata to tables, columns, or other objects.