enumeration datatype in postgresql?
Started by Marc Lambrichsover 24 years ago2 messagesgeneral
Re: enumeration datatype in postgresql?
Hi, enum is a very stupid thing in mysql :)
Use check in psql.
http://www.postgresql.org/idocs/index.php?sql-createtable.html
Sample:
create table mytable (
shortcut char(2) check (shortcut in ('en','nl','de'))
);
Marc Lambrichs wrote:
Show quoted text
Is there an enumeration datatype in postgresql like the enum in mysql?
Cheers,
Marc