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!
Latihan ini adalah bagian dari kursus
Introduction to SQL
Petunjuk latihan
- Using PostgreSQL, select the
genrefield from thebookstable; limit the number of results to 10.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
-- Select the first 10 genres from books using PostgreSQL
___