R reshma Member Joined Mar 10, 2005 Messages 15 Programming Experience 1-3 Jun 1, 2005 #1 Hi, Can anyone send me the sql query to retrieve only the colum names of a table. Thanks, Reshma
C cliffd64 Member Joined Jun 7, 2005 Messages 13 Programming Experience 5-10 Jun 7, 2005 #2 OK, assuming you have a table in your schema named Customer, here is how you would list the columns for the customer table: VB.NET: select column_name from INFORMATION_SCHEMA.COLUMNS where table_name = 'Customer'; The results will look similar to this: column_name ------------- cid custid firstnm lastnm title compname balance custtype billreportid phone fax email datestart dateend entityclass holdstatus duecalc ntilldue billcust GroupTag lockcycle comment Upvote 0 Downvote
OK, assuming you have a table in your schema named Customer, here is how you would list the columns for the customer table: VB.NET: select column_name from INFORMATION_SCHEMA.COLUMNS where table_name = 'Customer'; The results will look similar to this: column_name ------------- cid custid firstnm lastnm title compname balance custtype billreportid phone fax email datestart dateend entityclass holdstatus duecalc ntilldue billcust GroupTag lockcycle comment