3 messages in com.mysql.lists.javaRe: Column Labels
FromSent OnAttachments
mike markovich10 May 2002 14:08 
JSJ Frei10 May 2002 16:53 
Jeff Kilbride11 May 2002 13:21 
Subject:Re: Column Labels
From:Jeff Kilbride (je@kilbride.com)
Date:05/11/2002 01:21:12 PM
List:com.mysql.lists.java

During a query or during table creation? During a query, you can use the "AS" keyword:

SELECT column1 AS sales FROM table

Now, when using the ResultSet object, you can retrieve the values of column1 by using the column name "sales":

String mySales = rs.getString("sales");

If you're talking about during table creation, then I don't know what you mean by "column label". I don't think MySQL supports an internal label or description for the columns other than the column name.

--jeff

Hi All,

I am trying to figure out how to set the description or label for a = column. I already have a working Java program that creates a table using

JDBC. I want to modify this program to so that it sets the column labels at the same time. Any suggestions will be appreciated.

Mike

To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail java@lists.mysql.com instead.