Limiting results
Let's take a look at a few of the genres represented in our library's books.
Recall that limiting results is useful when testing code since result sets can have thousands of results. Queries are often written with a LIMIT of just a few records to test out code before selecting thousands of results from the database.
Let's practice with LIMIT!
Deze oefening maakt deel uit van de cursus
Introduction to SQL
Oefeninstructies
- Using PostgreSQL, select the
genrefield from thebookstable; limit the number of results to 10.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
-- Select the first 10 genres from books using PostgreSQL
___