SQL is the standard language for accessing and manipulating databases.
Common database management systems are: MySQL, SQL Server, Access, Oracle, Sybase, and DB2
Knowledge of SQL is invaluable for anyone who wants to store or retrieve data from a database.
A database usually contains one or more tables. Each table is identified by a name (e.g. "Customers" or "Orders"). Tables contain records (rows) with data.
Below is an example of a table called "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 (one for each person) and four columns (LastName, FirstName, Address, and City).
With SQL, we can query a database and have a result set returned.
A query like this:
Gives a result set like this:
| LastName |
|---|
| Hansen |
| Svendson |
| Pettersen |
Study our Complete SQL tutorial
Your message has been sent to W3Schools.