December 4, 2010 at 11:40 am
Comments posted to this topic are about the item Get column names in a table
December 5, 2010 at 10:00 pm
Hi To find column in a table you posted a code but it is getting results... Here I am posting the code to get column in the table that is also same it is getting results.... but for this i am getting results for one table... but i need all the tables column names in the DB... Plz give me query for that....
SELECT Column_Name 'Column Name',
Data_type 'Data Type', character_maximum_length 'Maxium Length'
FROM information_schema.columns WHERE table_name = 'Table_Name'
:-):-)suresh:-):-)
December 6, 2010 at 6:01 am
SELECT Column_Name 'Column Name',table_name 'Table_Name;
Data_type 'Data Type', character_maximum_length 'Maxium Length'
FROM information_schema.columns
GROUP BY table_name
December 6, 2010 at 11:19 am
Suresh, to get that information for all tables in the database, remove the WHERE clause from the original query.
Phil Helmer
Database Engineer
May 17, 2016 at 12:46 pm
Thanks for the script.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply