DDL and SQL Commands Chapter 4
DDL and SQL Commands Chapter 4
◼ Syntax:
CREATE TABLE tablename
(column_name type [NULL/NOT NULL],
column_name type [NULL/NOT NULL],
column_name type [NULL/NOT NULL]
..);
RELATIONAL MODEL RULES
Type Description
CHAR (size) Text data, maximum of ‘size’ characters up to 240
LONG Character data up to 65535 (some restrictions may
apply on the use of this field in a select statement)
NUMBER Maximum of 40 digits (will accept scientific
notation)
NULL AND NOT NULL
◼ These indicate whether the field will allow NULL values (which
is the default) or whether all cells must have a value
EXAMPLE 1