Jul 27, 2003 #1 codeWarrior456 Technical User Joined Oct 27, 2002 Messages 27 Location US Is there a way to write a query that just returns the names of all the columns in a given table? If so, how can this be done? Thanks for your help in advance.
Is there a way to write a query that just returns the names of all the columns in a given table? If so, how can this be done? Thanks for your help in advance.
Jul 27, 2003 1 #2 swampBoogie Programmer Joined Jan 6, 2003 Messages 1,660 Location SE Code: select column_name from information_schema.columns where table_name = 'GIVEN' Upvote 0 Downvote
Jul 27, 2003 Thread starter #3 codeWarrior456 Technical User Joined Oct 27, 2002 Messages 27 Location US Thanks! Upvote 0 Downvote
Jul 27, 2003 #4 clarkin Programmer Joined Dec 4, 2002 Messages 707 Location IE have a look at the built in stored procedures sp_help and sp_columns too: Code: sp_help GivenTable sp_columns GivenTable Try them out in QA - sp_help gives you lots of useful info. Posting code? Wrap it with code tags: [ignore] Code: [/ignore][code]CodeHere [ignore][/code][/ignore]. Upvote 0 Downvote
have a look at the built in stored procedures sp_help and sp_columns too: Code: sp_help GivenTable sp_columns GivenTable Try them out in QA - sp_help gives you lots of useful info. Posting code? Wrap it with code tags: [ignore] Code: [/ignore][code]CodeHere [ignore][/code][/ignore].