Informatics Practices · Ch 7 — Introduction to Structured Query Language (SQL)
SQL for Data Query
SQL for Data Query
Everything so far — creating the database, defining tables, storing and manipulating records — has been preparation for the operation databases really exist for: getting data back out. The reason data is kept in a database at all is that retrieving it later becomes easy, in whatever way it is wanted. SQL provides efficient mechanisms to retrieve data stored in multiple tables of a MySQL database — or of any other RDBMS.
Retrieval works through queries: SQL commands entered by the user, in which the specific requirements for the data to be retrieved are spelled out. The SQL statement that retrieves data from the tables of a database is SELECT, and for this reason SELECT is also called the query statement. The sections that follow are devoted to what SELECT can do.
Before moving on, two questions from the insertion work are worth settling: …