Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/236.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我想将自动增量添加到表中的第一列_Php_Mysql_Auto Increment - Fatal编程技术网

Php 我想将自动增量添加到表中的第一列

Php 我想将自动增量添加到表中的第一列,php,mysql,auto-increment,Php,Mysql,Auto Increment,如何将Auto_Increment属性添加到表中的第一列?这是我尝试过的,但不起作用: "ALTER TABLE `User_ReputationLog` MODIFY `EntryID` int(11) AUTO_INCREMENT;" 试试这个: ALTER TABLE `User_ReputationLog` MODIFY COLUMN `EntryID` INTEGER NOT NULL AUTO_INCREMENT;

如何将Auto_Increment属性添加到表中的第一列?这是我尝试过的,但不起作用:


"ALTER TABLE `User_ReputationLog` MODIFY `EntryID` int(11) AUTO_INCREMENT;"
试试这个:

ALTER TABLE `User_ReputationLog` MODIFY COLUMN `EntryID` INTEGER NOT NULL AUTO_INCREMENT;