Cursussen/Courses Codesnippets     Top 
SQL select - Introduction


Select queries
When the database is filled with data, you can request that data. In SQL you write a select query. You ask the RDBMS to retrieve specific data from database tables and display them in a list ("recordset").
When creating a query, you have many options for formulating that query. If the query is not correctly formulated you will not get the desired results.
A query can be used in programs where the user specifies search criteria and the program then displays the list.
A brief overview (or template):
SELECT field names
FROM table names
WHERE conditions
ORDER BY field names
GROUP BY field names
HAVING conditions
The examples use the MySQL "winestore" database which you can download here:Winestore
You place the extracted folder "winestore" in the Uwamp, XAMPP or WampServer MySQL data folder:


X

Paragraphs

Select queries