Enumerations in Computational Languages
Let’s learn about enumeration in various computational languages such as SQL, XML, and JS.
We'll cover the following
Enumerations in SQL
Unfortunately, standard SQL does not support enumerations. Some DBMS, such as MySQL and Postgres, provide their own extensions of SQL column definitions in the CREATE TABLE
statement that define enumeration-valued columns.
A MySQL enumeration is specified as a list of enumeration labels with the keyword ENUM
within a column definition, as shown below:
Get hands-on with 1400+ tech skills courses.