Getting AUTO_INCREMENT info from DatabaseMetaData
843854Jan 17 2002 — edited Jan 31 2003Hi all,
I am experimenting with DatabaseMetaData on a MySQL database. Does anyone know how to get the information that a column of a table is autoincremented.
The DatabaseMetaData.getColumns(...) method does not seem to return this info.
Suppose a table created by
CREATE TABLE book
(book_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255))
The DatabaseMetaData returns all information of this table except that book_id is AUTO_INCREMENT.
Or am I missing something?
cu
Achim