mysql's method for determining whether a field exists

  • 2020-06-07 05:27:54
  • OfStack

1. desc command
Format: desc tablename columnname

Example:
desc `table` `mid`
desc `table` '%abc%'

2. show columns
Format: show columns from tablename like columnname
Example:
show columns from `table` like 'mid'
show columns from `table` like '%abc%'

3. describe command
Format: describe tablename columnname
Photograph by show columns from
Example:
describe `table` `mid`

describe `table` '%abc%'

Related articles: