SQL Quiz Chap 3 and 4

  1. A ____ file is a text file with a .sql extension that contains SQL commands.
    script
  2. SQL was developed in the mid-____.
    1970s
  3. To delete an entire table, use the ____ command and then re-create the table.
    DROP TABLE
  4. The ____ operator specifies a range of values in a condition.
    BETWEEN
  5. Preceding a condition by the ____ operator reverses the truth of the original condition.
    NOT
  6. The ____ function calculates a total of the values in a column.
    SUM
  7. The ____ command defines a table’s structure by listing its columns, data types, and column lengths.
    CREATE TABLE
  8. The ____ function determines the number of rows in a table.
    COUNT
  9. You form compound conditions by connecting two or more simple conditions using the ____ operator.
    • AND OR NOT
    • All of the above
  10. In the SELECT clause, you can use the ____ symbol to indicate that you want to include all columns.
    *
  11. For any column whose data type is CHAR, values must be enclosed in ____.
    single quotation marks
  12. You use the ____ clause to list data in a specific order.
    ORDER BY
  13. n SQL, you use the ____ command to query a database.
    SELECT
  14. The basic form of the SQL SELECT command is ____.
    SELECT-FROM-WHERE
  15. The ____ clause lets you group data on a particular column.
    GROUP BY
  16. Which of the following commands changes the value in a column?
    UPDATE
  17. The ____ data type stores only the actual character string.
    VARCHAR
  18. To display all the rows and columns in a table, type the word SELECT, followed by a(n) ____, followed by the word FROM and then the name of the table containing the data you want to view.
    asterisk
  19. You indicate the end of a command by typing a ____.
    semicolon
  20. Use the ____ data type for columns that contain letters and special characters and for columns containing numbers that will not be used in calculations.
    CHAR
  21. A ___ has this form: column name, comparison operator, and then either another column name or a value
    simple condition
  22. You form ___ ___ by connecting two or more simple conditions using the AND, OR and NOT operators.
    compound conditions
  23. The DISTINCT keyword is used to return only distinct (different) values. What is the syntax of a SELECT statement with this keyword added to it?
    SELECT DISTINCT column_name(s)FROM table_name
  24. When a script file contains more than one command, each command must end with a _____.
    semicolon
  25. (True or False)
    Aggregate functions apply to groups of rows.
    True
  26. The ______ operator finds rows that do not contain a null value in the specified column
    IS NOT NULL
  27. In SQL, you use the _____ command to query a database.
    SELECT
  28. Which of the following commands changes the value in a column?
    UPDATE
  29. To include spaces in computed column names, enclose the computed column name in ____.
    single quotes
Author
zlittlerabbit
ID
69589
Card Set
SQL Quiz Chap 3 and 4
Description
SQL, Structured Query Language, Database Quiz Chapter 3 and 4 of A Guide to SQL
Updated