Get table column names in mysql database

5 minutes read

Below Mysql query is very useful to Get list of column name from table with its datatype.
You can get list of all the tables name and all the fields count with help of this query.

PHP Mysql

PHP Mysql Query

In below query just change <–YoursDatabaseName–> to your database and <–YoursTableName–> to your table name where you just want Field values of DESCRIBE statement

//Get total number of TABLES IN a DATABASE
//Get total number of COLUMNS IN a DATABASE
//Get total number of COLUMNS IN a TABLE
//Get LIST of COLUMNS NAME AND DATA TYPE
 //Get LIST of TABLE NAME of ANY Databse

 

Facebook Twitter LinkedIn Telegram Whatsapp

Related Posts:

we can execute a query that will list all tables in a specific database along with the disk space (size) of each. We can list all the tables along with each table size (disk space) by using a query. SELECT table_name AS Table, ROUND(((data_length + inde...
“How to Export MySQL data to Excel in PHP ?” This script will used to export data into .xls format from mysql database.You need to just copy this code and update database connection details. Below code will export mysql data into excel (.xls format) with ever...
How to manage international languages in MySQL database using php ? If you want to store multiple languages like Arabic, French, Hindi or Urdu to your MySQL database, default settings is not valid to do that to insert all languages in database. If you insert ...