How to find names of all columns and its datatype of a table?
Is there a command similar to "DESCRIBE" to get details of a table i.e the column names and its datatype
Hi Smitha Vivekanandan - thanks for writing in and apologies for the delayed response.
If I understand you correctly, you are trying to get the name of the columns within a table and the data types? If so, you can use the following:
SHOW DATABASES; //lists the databases on the server
SHOW COLUMNS IN DATABASE <the name of the DB> // this will contain all table columns/schemas in a database along with datatypes.
I hope this answer helps. Please don't hesitate to write into our in-product chat if you have any additional questions.