1. Type:

    SELECT quote,last FROM quote,name WHERE (quote.name_id=name.id AND last LIKE 'J%');

    then press ENTER.

    The query results should look like this:

    Again, this query is similar to the ones you've been working with. The difference is in the second condition of the WHERE statement:

    last LIKE 'J%'

    LIKE compares two values; in this case, the last name of a president with a letter, J.

    % is a wildcard character, that stands for any character or combination of characters.

    J% stands for any name starting with a J. For instance, J% could stand for Jefferson, Jackson, or Johnson.

    This query returns quotes from presidents whose last names begin with J.
  2. Close the MySQL database connection, then exit the terminal window.