How does a library find every book by one author, with the newest first?
3 lessons, about 1 h 15 min3 simulations10 problems3 practice questionsPython in every lesson
SQL is the language we use to ask a database for data. A script starts with SELECT, which names the fields to show, and FROM, which names the table. You write such scripts, read them, and work out their exact output.
WHERE keeps only the records that meet a condition. You write conditions with the comparison operators, put text in quotes, use TRUE and FALSE for a Boolean field, and work out exactly which records a script outputs.
ORDER BY sorts the output of a query by one field, in ascending (ASC) or descending (DESC) order. You sort numbers, text and dates, put ORDER BY together with WHERE, and work out the exact order of the output.
Log in to join the discussion.
Loading…