Quantcast
Channel: Query – Technical Blog
Viewing all articles
Browse latest Browse all 8

Change MySQL auto increment value

$
0
0

First Check what is current increment value :

SELECT `AUTO_INCREMENT`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'DatabaseName'
AND TABLE_NAME = 'TableName';

Now, Set auto increment value:

ALTER TABLE tbl AUTO_INCREMENT = 5;

Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles



Latest Images