Introduction to Computer Science and Engineering
Explainer
SQL: asking a database a question
One line of SQL can search millions of student records in a blink.
Quick check · tap an answer to continue
Lesson notes
Key points
- SQL, Structured Query Language, is a declarative language: you state what data you want, not how to find it.
- A basic query uses SELECT for columns, FROM for the table, and WHERE to filter rows by a condition.
- The database's query optimiser then chooses the actual execution plan, such as using an index instead of scanning every row.
Definitions
- SQL
- Structured Query Language: the standard declarative language for querying and changing relational databases.
Takeaway: SQL says what you want; the optimiser decides how to get it.
Quick check: Which SQL clause filters rows by a condition?
- WHERE
- FROM
- SELECT
DeclarativeSELECT FROM WHEREQuery optimiser
Lessons like this, for your syllabus.
Short narrated study videos written for your course, level and exam. Free to start.
Get lessons for your own syllabus