CoursesWeb
CoursesWeb

Reputation: 4237

Show tables status result

If I want to return only the result of one field from the result set of a SHOW TABLE STATUS command, for example "Auto_increment", what would the query look like?

Upvotes: 1

Views: 1726

Answers (1)

Johan
Johan

Reputation: 76535

SELECT AUTO_INCREMENT FROM information_schema.TABLES 
WHERE TABLE_SCHEMA = 'db1' AND TABLE_NAME = 'table1'

http://dev.mysql.com/doc/refman/5.0/en/tables-table.html
http://dev.mysql.com/doc/refman/5.0/en/information-schema.html

Upvotes: 1

Related Questions