Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Clif Reeder clifff

🏠
Working from home
View GitHub Profile
@clifff
clifff / add_auto_increment_to_int_single_pk.sql
Created Jan 11, 2019 — forked from carlosrobles/add_auto_increment_to_int_single_pk.sql
Add auto_increment to all the single PRIMARY KEY of type int of a database
View add_auto_increment_to_int_single_pk.sql
DROP TABLE if exists temp;
CREATE TABLE temp (
`table` varchar(250) DEFAULT NULL,
`colum` varchar(250) DEFAULT NULL,
`type` varchar(250) DEFAULT NULL,
`number_of_PK` tinyint(2) DEFAULT NULL,
`alter` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
You can’t perform that action at this time.