Anonymous Asked in Cars &Transportation · 2 weeks ago

How do I list all columns in a table in SQL?

In a query editor, if you highlight the text of table name (ex dbo.MyTable) and hit ALT + F1 , you'll get a list of column names, type, length, etc. 17 нояб. 2011 г.


How can I see all columns in a table?

1 Answer1SELECT COL_NAME AS 'Column_Name', TAB_NAME AS 'Table_Name'2FROM INFORMATION_SCHEMA.COLUMNS.3WHERE COL_NAME LIKE '%MyName%'4ORDER BY Table_Name, Column_Name;

How do I get a list of all columns of a table in mysql?

The best way is to use the INFORMATION_SCHEMA metadata virtual database. Specifically the INFORMATION_SCHEMA. COLUMNS table... SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.1Ahh, DESCRIBE is just a shortcut for SHOW COLUMNS FROM . ... 2And DESC is even shorter-hand for DESCRIBE !

Related Questions

Relevance
Write us your question, the answer will be received in 24 hours