SQL Server equivalent to MySQL enum data type?

Patrick picture Patrick · Sep 16, 2009 · Viewed 132.3k times · Source

Does SQL Server 2008 have a a data-type like MySQL's enum?

Answer

chaos picture chaos · Sep 16, 2009

It doesn't. There's a vague equivalent:

mycol VARCHAR(10) NOT NULL CHECK (mycol IN('Useful', 'Useless', 'Unknown'))