Sunday, November 22, 2009
Friday, November 6, 2009
To Retrieve All Column names from a given table using Mysql query
There are situation, we need to have retrieve column names associated with particular a particular table. For this so many techniques are available
here is the query
table_name ='your table_name';
Here we are using simple select query to return the desired output
what is information schema
INFORMATION_SCHEMAprovides access to database metadata. A schema is a database, so the information_schema provides information about databases. Metadata is data about the data, such as the name of a database or table, the data type of a column, or access privileges. Other terms that sometimes are used for this information are data dictionary and system catalog.
Here COLUMN_NAME is in the COLUMN associated with information schema.The entire query is direct and simple huh?