MySQL: How to set the Primary Key on phpMyAdmin?

前端 未结 4 1270
迷失自我
迷失自我 2021-02-07 04:50

Help! First time using phpMyAdmin. The column that I intend to set as a primary key is of TEXT in phpMyAdmin, it gave me an error message, the primary key can\'t be set! And I d

4条回答
  •  误落风尘
    2021-02-07 05:13

    MySQL can index the first x characters of a column,but a TEXT type is of variable length so mysql cant assure the uniqueness of the column.If you still want text column,use VARCHAR.

提交回复
热议问题