Dies ist eine alte Version des Dokuments!
LU06b - SQL-DDL: Table Management
Source:
Learning Objectives
In this learning unit, we will learn how to manage database tables, i.e. how to create, modify and delete database tables.
Let's start by creating a table based on the ERD of the student management tool, as shown below:
Our goal is to create the table „stundent“ on our database. For that we need to know how the basic syntax for creating table is.
CREATE TABLE table_name ( column1 datatype, column2 datatype, column3 datatype, .... );
In our example the our concrete CREATE statement would look like:
CREATE TABLE student ( stundent_id INT, name VARCHAR(50), surname VARCHAR(50), birthdate DATE, matrno: CHAR(6) );