List the columns in a table along with their data type and other attributes:
Copy
Ask AI
SHOW COLUMNS FROM nation;
Copy
Ask AI
Column | Type | Extra | Comment-----------+--------------+-------+--------- nationkey | bigint | | name | varchar(25) | | regionkey | bigint | | comment | varchar(152) | |
Specify a pattern in the optional LIKE clause to
filter the results to the desired subset. For example, the following query
allows you to find columns ending in key:
Copy
Ask AI
SHOW COLUMNS FROM nation LIKE '%key';
Copy
Ask AI
Column | Type | Extra | Comment-----------+--------------+-------+--------- nationkey | bigint | | regionkey | bigint | |