DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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:-)

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links