โ† All SQL Flashcard Decks

General Concepts 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 General Concepts flashcards as text
  1. What is a subquery in SQL?

    Answer: A query nested inside another query

    A subquery is a query embedded within another SQL statement.

  2. Which operator combines results of two SELECT statements and removes duplicates?

    Answer: UNION

    UNION combines result sets and removes duplicate rows.

  3. What does a VIEW represent in SQL?

    Answer: A virtual table based on a query

    A view is a saved query that acts like a virtual table.

  4. Which DDL command creates a new table?

    Answer: CREATE TABLE

    CREATE TABLE defines a new table and its columns.

  5. What does the COALESCE function return?

    Answer: The first non-NULL value in a list

    COALESCE returns the first non-NULL value among its arguments.

  6. Which constraint ensures a column cannot contain NULL values?

    Answer: NOT NULL

    The NOT NULL constraint requires a column to always have a value.

  7. What is the result of dividing by zero in most SQL implementations?

    Answer: An error or NULL

    Most SQL databases raise an error or return NULL when dividing by zero.