Martin Gruber — Understanding Sql.pdf

This query retrieves all columns (*) from the customers table.

This query retrieves all columns (*) from the customers table where the country is ‘USA’.

\[UPDATE customers SET email='john.doe2@example.com' WHERE name='John Doe';\]

For example: $ \(SELECT * FROM customers;\) $

The ORDER BY clause is used to sort data in ascending or descending order. For example: $ \(SELECT * FROM customers ORDER BY last_name ASC;\) $