• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 552
  • Last Modified:

Retrieve Column name in SQL

Dear Experts,
   I have a database and I don't know what the column names are.  Using SQL in Excel 97, what command(s) do I use to retrieve the name of Column 1 or Column 5?  Also, what command(s) do I use to retrienve the number of columns exist in a database?  Thanks in advance for your help.
   - Charles
0
charlesn
Asked:
charlesn
1 Solution
 
-Yoshi-Commented:
try the query:

DESCRIBE tblname
0
 
prasannaaCommented:
If your using Oracle use the describe command
SYNTAx
desc[ribe] tableName

If you are using u can use sp_help stored procedure

SYNTAX

sp_help table_name
0
 
charlesnAuthor Commented:
Thanks for your suggestion; however it didn't work.  Instead a colleague suggested that I try this (which worked):
SELECT * FROM AnyDatabase

Thanks, again.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now