If this is mysql you can do a describe on the table from your mysql client.. like: mysql> describe testtable And you'll get something like: +----------+--------------+------+-----+------------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+------------+-------+ | day | date | | PRI | 0000-00-00 | | | username | varchar(100) | | PRI | | | | domain | varchar(100) | | PRI | | | +----------+--------------+------+-----+------------+-------+