This statement is used to query all columns in a specified table.
1 | SHOW COLUMNS {FROM | IN} table_name [{FROM | IN} db_name]; |
Parameter |
Description |
---|---|
table_name |
Table name |
db_name |
Database name |
The specified table must exist in the database. If the table does not exist, an error is reported.
Run the following statement to view all columns in the student table.
1 | SHOW COLUMNS IN student; |