SQL Guide
SQL - Structured Query Language
SQL is the standard computer language for accessing and processing databases.
Common database management systems: MySQL, SQL Server, Access, Oracle, Sybase, and DB2
For those who wish to store and retrieve data in databases, knowledge of SQL is invaluable.
What is SQL?
- SQL stands for Structured Query Language (Structured Query Language)
- SQL gives us the ability to access databases
- SQL is an ANSI standard computer language
- SQL executes queries against databases
- SQL can retrieve data from databases
- SQL can insert new records into databases
- SQL can delete records from databases
- SQL is easy to learn
SQL database tables
A database usually contains one or more tables. Each table is identified by a name (e.g., "Customers" or "Orders"). A table contains records (rows) with data.
The following example is a table named "Persons":
| LastName | FirstName | Address | City |
|---|---|---|---|
| Hansen | Ola | Timoteivn 10 | Sandnes |
| Svendson | Tove | Borgvn 23 | Sandnes |
| Pettersen | Kari | Storgt 20 | Stavanger |
The table above contains three records (each for one person) and four columns (last name, first name, address, and city).
SQL query program
With SQL, we can query a database and get a returned result set.
The query program looks like this:
SELECT LastName FROM Persons
The result set looks like this:
| LastName |
|---|
| Hansen |
| Svendson |
| Pettersen |
How to learn SQL?
Visit our complete SQL tutorial