SQL Primer

## Web Primer

Web Primer Web HTML Web CSS Web JavaScript Web XML Web Server Web SQL

# SQL Primer

« Previous
Next Chapter »

## SQL - Structured Query Language

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.

## What is SQL?

- SQL stands for Structured Query Language
- SQL allows you to access a database
- SQL is an ANSI standard computer language
- SQL can execute queries against a database
- SQL can retrieve data from a database
- SQL can insert new records in a database
- SQL can delete records from a database
- SQL can update records in a database
- 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"). 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).

## SQL Queries

With SQL, we can query a database and have a result set returned.

A query like this:

SELECT LastName FROM Persons

Gives a result set like this:

LastName
Hansen
Svendson
Pettersen

## How to Learn SQL?

Study our Complete SQL tutorial

« Previous
Next Chapter »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE