Slide 14.5: Introduction to SQL
  Slide 14.7: The CREATE TABLE statement
  Home


SQL (Structured Query Language)


 LastName   FirstName   Address   City 
Hansen Ola Timoteivn 10 Sandnes
Svendson Tove Borgvn 23 Sandnes
Pettersen Kari Storgt 20 Stavanger

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

 SELECT  LastName  FROM  Persons;
==>
 LastName 
Hansen
Svendson
Pettersen

SQL Data Manipulation Language (DML)
SQL is a syntax for executing queries. But the SQL language also includes a syntax to update, insert, and delete records. These query and update commands together form the DML part of SQL: SQL Data Definition Language (DDL)
The Data Definition Language (DDL) part of SQL permits database tables to be created or deleted. We can also define indexes (keys), specify links between tables, and impose constraints between database tables. The most important DDL statements in SQL are