Retrieving column names from a SQL Table


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Retrieving column names from a SQL Table

  1. #1
    Join Date
    Apr 2003
    Posts
    5

    Retrieving column names from a SQL Table

    How can I get all the column names from a table in my database?
    Thanx.

  2. #2
    Join Date
    Nov 2002
    Posts
    18
    I have no idea how to handel things with SQL in Java, but I do know this MySQL query returns the column names it's:
    "SHOW FIELDS FROM table_name" this is just like an SELECT query.

    I hope this helps, for more infomation see: Mysql

    -Wesley
    I like Java!
    Java is cool!

  3. #3
    Join Date
    Mar 2003
    Posts
    834
    ...or call getMetaData() from the ResultSet object.
    ArchAngel.
    O:-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center