Adding column with primary key in existing table

后端 未结 5 1943
感动是毒
感动是毒 2021-02-02 12:29

I am trying to add primary key to newly added column in existing table name Product_Details.

New Column added: Product_Detail_ID (int

5条回答
  •  旧时难觅i
    2021-02-02 13:10

    In mysql, I was able to achieve with following query

    ALTER TABLE table_name ADD new_column int NOT NULL AUTO_INCREMENT primary key

提交回复
热议问题