Viewing All Columns in a Specified Table
Function
This statement is used to query all columns in a specified table.
Syntax
1
|
SHOW COLUMNS {FROM | IN} table_name [{FROM | IN} db_name]; |
Keywords
- COLUMNS: columns in the current table
- FROM/IN: followed by the name of a database whose tables and views will be displayed. Keyword FROM is equivalent to IN. You can use either of them in a statement.
Parameters
Parameter |
Description |
---|---|
table_name |
Table name |
db_name |
Database name |
Precautions
The specified table must exist in the database. If the table does not exist, an error is reported.
Example
Run the following statement to view all columns in the student table.
1
|
SHOW COLUMNS IN student; |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot