Skip to content

Instantly share code, notes, and snippets.

@harveyqing
Created March 15, 2014 03:46
Show Gist options
  • Save harveyqing/9561581 to your computer and use it in GitHub Desktop.
Save harveyqing/9561581 to your computer and use it in GitHub Desktop.
Retrive all fields in a specified table
Syntax:
mysql> SHOW FULL COLUMNS FROM DBname.table_name
Head description:
Field :field name
Type:field type
Collation:char set (above mysql 5.0)
Null :can be `NULL` of not
Key:index(PRI,unique,index)
Default:default value
Extra:extra information (has auto_increment or not)
Privileges:privileges
Comment:comments(above mysql 5.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment