1. Home
  2. Explore
  3. Computer Science
  4. SQL Basics

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

SQL Basics

  • 20Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: SQL Basics
SQL stands for Structured
Language.

20 questions

  1. 1
    SQL stands for Structured
    _____
    Language.
    Hint

    Think about the word that describes requesting information from a database.

    Answer

    Query

  2. 2
    SQL is primarily used to communicate with
    _____
    .
    Hint

    Consider what stores and organizes data that you interact with via SQL.

    Answer

    databases

  3. 3
    The acronym CRUD stands for Create,
    _____
    , Update, and Delete.
    Hint

    It's the 'R' in CRUD, referring to retrieving data.

    Answer

    Read

  4. 4
    A database table consists of columns (fields) and
    _____
    .
    Hint

    These are the horizontal entries that contain the actual data.

    Answer

    rows

  5. 5
    DBMS stands for Database
    _____
    System.
    Hint

    Think of the software that 'manages' databases.

    Answer

    Management

  6. 6
    The two main types of databases are relational and
    _____
    .
    Hint

    This type does not enforce relationships between tables.

    Answer

    non-relational

  7. 7
    The command to create a new database is CREATE
    _____
    name;
    Hint

    This SQL keyword indicates you are creating a new database object.

    Answer

    DATABASE

  8. 8
    The command to list all databases is SHOW
    _____
    ;
    Hint

    This command displays a list of available databases.

    Answer

    DATABASES

  9. 9
    The command to list all tables in the current database is SHOW
    _____
    ;
    Hint

    This command displays the tables within the currently selected database.

    Answer

    TABLES

  10. 10
    To add a new column to an existing table, use ALTER TABLE table
    _____
    column datatype;
    Hint

    This keyword specifies that you are adding something to the table structure.

    Answer

    ADD

  11. 11
    When creating a table, columns are defined by a name and a
    _____
    .
    Hint

    Think about what kind of data the column will store, like INT or VARCHAR.

    Answer

    data type

  12. 12
    To insert a new row into a table, use INSERT
    _____
    table VALUES (...);
    Hint

    This keyword follows INSERT to indicate the target table.

    Answer

    INTO

  13. 13
    To retrieve all columns from a table, use SELECT
    _____
    FROM table;
    Hint

    This symbol represents 'all' in SQL.

    Answer
  14. 14
    To retrieve only specific columns, list them after SELECT and before the
    _____
    keyword.
    Hint

    This keyword specifies the table from which to retrieve data.

    Answer

    FROM

  15. 15
    To filter rows in a query, add a
    _____
    clause.
    Hint

    This clause specifies conditions that must be met.

    Answer

    WHERE

  16. 16
    The DELETE command should always include a
    _____
    clause to avoid deleting all rows.
    Hint

    Without this clause, all rows in the table are removed.

    Answer

    WHERE

  17. 17
    The UPDATE command uses the
    _____
    keyword to set new values for columns.
    Hint

    This keyword assigns new values to specified columns.

    Answer

    SET

  18. 18
    To order results by a column, use ORDER BY column
    _____
    ASC or DESC;
    Hint

    Specify ascending (default) or descending order.

    Answer

    ASC

  19. 19
    A string data type of variable length in MySQL is
    _____
    .
    Hint

    This data type stores text and allows a maximum number of characters.

    Answer

    VARCHAR

  20. 20
    A data type that stores true or false values in MySQL is
    _____
    .
    Hint

    This type is often represented as 1 (true) or 0 (false).

    Answer

    BOOLEAN

1 of 20
Question 1 of 20

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent