MySQL Basics In Pictures
  1. Type:

    SELECT quote,last FROM quote,name WHERE ( AND last='Jefferson');

    then press ENTER.

    The query results should look like this:

    This query joins the two tables quote and name, but you're using different criteria in the WHERE statement:

    WHERE ( AND last='Jefferson')

    The first condition is the same as before:

    name_id (in the quote table) and id (in the name table) are the link between the two tables.

    The second condition:


    narrows the query to only those quotes from presidents with the last name of Jefferson.

    The single quotes surrounding 'Jefferson' tell the database that Jefferson is text.

    TIP: If you use numeric criteria in your query, don't use quotes. For instance, you'd type:

    SELECT quote,last FROM quote,name WHERE ( AND;