Chapter 2 Review Questions


Let us see how much you have learned in this chapter by going over these review questions.

  1. What is typed at the mysql> prompt to disconnect from the server?
    1. EXIT
    2. HALT
    3. Q
    4. QUIT
    5. STOP

  2. Which statement is equivalent to SELECT * FROM pet WHERE name REGEXP '^love';?
    1. SELECT * FROM pet WHERE name LIKE 'love$';
    2. SELECT * FROM pet WHERE name LIKE 'love%';
    3. SELECT * FROM pet WHERE name REGEXP 'love_';
    4. SELECT * FROM pet WHERE name REGEXP 'love$';
    5. SELECT * FROM pet WHERE name REGEXP 'love%';

  3. Which statement is true?
    1. The SELECT statement can be used to populate a table with data.
    2. The WHERE clause is used to populate a table with data.
    3. Use LOAD DATA and INSERT statements to select records based on one or more criteria.
    4. Use the DESCRIBE statement verify a table was created as expected.
    5. Use the SET TABLE statement to get a list of existing tables.

  4. In which format does MySQL expect dates to be?
    1. DD-MM-YY
    2. DD-MM-YYYY
    3. MM-DD-YY
    4. MM-DD-YYYY
    5. YYYY-MM-DD

© 2007 John Michael Pierobon

Notes