Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

(click on this box to dismiss)

How do I list information regarding a table?

How do I list information such as the columns, their data types and the constraints present on a table? Is there a possibility to list them all together?

link comment (1)
asked 4 years ago
1 Answer

You can use the following query to retrieve column information for a table.

SHOW COLUMNS {FROM | IN} tbl_name [LIKE 'pattern' | WHERE expr]

That will show:

  • column name
  • type
  • null or not
  • primary key or not
  • default value
  • auto increment or not

For more information, see

link comment (0)
answered 4 years ago

You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: