SQLite uses SELECT to retrieve data from tables. It’s the foundation of all database queries.
SQLite
Learn database fundamentals with SQLite, the world's most widely deployed database.
SELECT Basics
Run this example to see how it works and then try the exercise.
Click "Run" to see the example in action...Click "Run" to execute your code...What does SELECT * return?
SUMMARY
In this section, you learned how to retrieve data with SELECT. Next, you'll learn how to filter data with WHERE clause.
WHERE Clause
The WHERE clause filters rows based on conditions. Only rows that match the condition are returned.
Run this example to see how it works and then try the exercise.
Click "Run" to see the example in action...Click "Run" to execute your code...Which operator is used for 'not equal to' in SQL?
SUMMARY
In this section, you learned how to filter data with WHERE clause. Next, you'll learn how to sort results with ORDER BY.
ORDER BY
ORDER BY sorts results by one or more columns. Use ASC for ascending (default) or DESC for descending.
Run this example to see how it works and then try the exercise.
Click "Run" to see the example in action...Click "Run" to execute your code...What is the default sort order if not specified?
SUMMARY
In this section, you learned how to sort results with ORDER BY. Next, you'll learn how to limit results with LIMIT and OFFSET.
Unlock 10 More Lessons
You've completed the free preview! Upgrade to Pro to access all 12 lessons in this course, plus advanced projects and certificates.
- LIMIT and OFFSET
- INSERT Statements
- UPDATE Statements
- DELETE Statements
- Aggregate Functions
- GROUP BY
- JOINs
- Subqueries
- Final Project: Library Database