How can i get the seed value of an identity column in MySql
Posted
by mmcdonald
on Stack Overflow
See other posts from Stack Overflow
or by mmcdonald
Published on 2010-06-09T22:58:47Z
Indexed on
2010/06/09
23:02 UTC
Read the original article
Hit count: 231
To get the seed and step values of an identity column in sql server i can use this syntax
SELECT ColumnName = name, Seed = seed_value, Step = increment_value
FROM sys.identity_columns
So far in MySql i have found that if i use this syntax
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE auto_increment IS NOT NULL
I can at least find out which columns are an identity...
The question being how can i get the SEED and STEP values of the identity column from the MySQL Schema.
© Stack Overflow or respective owner