Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
How to get the possible values for SET field in MySQL?
To get possible values for set field, you can use below syntax −
desc yourTableName yourSetColumnName;
Let us first create a table −
mysql> create table DemoTable
(
Game set('Chess','Pig Dice','29 Card')
);
Query OK, 0 rows affected (0.60 sec)
Following is the query to get available values for set field −
mysql> desc DemoTable Game;
This will produce the following output −
+-------+-----------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------------------------------+------+-----+---------+-------+
| Game | set('Chess','Pig Dice','29 Card') | YES | | NULL | |
+-------+-----------------------------------+------+-----+---------+-------+
1 row in set (0.02 sec) Advertisements
