GITTA-Logo
PDF Version of this document Search Help

Lesson Navigation IconStructured Query Language SQL

Unit Navigation IconSQL overview

LO Navigation IconSQL Concepts

LO Navigation IconData Definition (DDL)

LO Navigation IconData Manipulation (DML)

LO Navigation IconData control (DCL)

Unit Navigation IconCreation and modification of tables

Unit Navigation IconBasic database queries

Unit Navigation IconSQL Insert, Delete and Update

Unit Navigation IconUsage of SQL

Unit Navigation IconSummary

Unit Navigation IconRecommended Reading

Unit Navigation IconBibliography

Unit Navigation IconMetadata


GITTA/CartouCHe news:


Go to previous page Go to next page

Data Definition (DDL)

In SQL the terms table, row and column are synonyms for relation, tuple and attribute. To create a new relation scheme in the database we start with the create table-command. Together with the creation we must provide the relations attributes and their domains (e.g. number, char or date). Additional we can define other constraints, checks and keys etc. The keyword NOT NULL tells the system that this attribute cannot be empty. Primary keys are declared using a special "table constraint"-clause.

Code-Beispiel: Create TableCode-Beispiel: Create Table

This example shows how a new table is created in SQL. In the intermediate lesson we take a closer look at all the SQL statements. For the moment you don't have to understand these statements in detail.

Top Go to previous page Go to next page