This is useful if you need to copy all the columns of a table into your IDE, for creating a form or query, for example. It does not include any other columns like the 'SHOW COLUMNS' statement.
SELECT column_name FROM information_schema.columns WHERE table_schema = 'DATABASE-NAME' AND table_name = 'TABLE-NAME';
Dev & Tech Notes
San Diego | Los Angeles | Big Bear | USA
Terms & Conditions ©2005-2024 TJohns.co
Terms & Conditions ©2005-2024 TJohns.co
Top Left Text cha
Web & App Development
Get MySQL Column Names Only
- Details
- Written by Timothy Johns
- Category: PHP / MySQL
- Hits: 1426
Comments