The following statement creates a table Products that contains three columns: product_id, low_fats, and recyclable.
While product_id is of type int
, both low_fats and recyclable are enums that can only be one of the declared values within the ENUM()
clause ('Y'
or 'N'
, in this case).
CREATE TABLE Products (
product_id int,
low_fats ENUM('Y', 'N'),
recyclable ENUM('Y', 'N')
);