3-Data types
3-Data types
DATA TYPES
CONTENTS
Name Description
Char varying(n), varchar(n) Variable length with limit
Character(n), char(n) Fixed length, blank padded
TEXT
Name Description
Text Variable unlimited length
FOR EXAMPLE
CREATE TABLE test1 (a Boolean, b text);
ENUMERATED TYPE
Comprise a static, ordered set of values
Enum type are created suing the CREATE TYPE command, e.g.
Once created, the enum type can be used in the table and function
definition much like any other type:
Remove column
ALTER TABLE product DROP COLUMN description
CHANGING DATA TYPES
To rename a table
INDEXES
To remove an index
DROP INDEX product_id_index
CONCLUSION