Setting only a few values ​​as a domain to list in phpmyadmin

How to set enum values ​​in phpmyadmin..I want to set the values ​​'0' or '1' in phpmyadmin for my field using the type "enum".

+7
source share
6 answers

or under your phpmyadmin

  • select enum

  • in the Length/Values column: '0' ,'1'

and your done

+5
source
 ALTER TABLE `table_name` CHANGE `old_column_name` `new_column_name` ENUM('0','1') DEFAULT NULL 
+3
source
 CREATE TABLE tableName ( enumColumn ENUM('0','1') ); 
+2
source

Long enough for this answer, maybe you should not use the one who asks this question, but may be useful for those who are not familiar with phpmyadmin. To set the default value for Enum, I will give the following example. Type = ENUM, Length / Values just enter a value inside one quotation mark, for example, "Male", "Woman", then select "Defined" by default : in the box below, simply enter Male without a quote. Hope this help!

+1
source

Put the length / values ​​as for 0 and 1 '0', '1'

+1
source

use the phpmyadmin => GUI by selecting the ENUM type and then just set the values.

-one
source

All Articles