Eine Einführung in
SQL
CREATE a new table
SQLite
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR(10) )
Specific to SQLite
none
DB2
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER NOT NULL PRIMARY KEY ,b VARCHAR(10) )
Specific to DB2
none
MS Access
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR(10) )
Specific to MS Access
MEMO
Allows up to 65535 characters
CURRENCY
Suitable for money.
PostgreSQL
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test CASCADE
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR(10) )
Specific to PostgreSQL
none
Oracle
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR2(10) )
Specific to Oracle
CLOB
Allows large character fields.
NUMBER(10,2)
Up to 10 digits before the point, 2 after.
MS SQL Server
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR(10) )
Specific to MS SQL Server
The DATE type is not supported. Use DATETIME instead.
MySQL
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR(10) )
Specific to MySQL
TEXT
Allows up to 65535 characters
DECIMAL(10,2)
Up to 10 digits before the point, 2 after.
Sybase
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR(10) )
Specific to Sybase
none
Mimer SQL
The following are examples of field types:
INTEGER
A whole number
VARCHAR(10)
Up to 10 characters.
CHAR(10)
Fixed number of characters
DATE
A date
DATETIME
Date and time
FLOAT
Floating point numbers
Execute tidy up
code
silently
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR(10) )
Specific to Mimer SQL
none