3 messages in com.mysql.lists.javaRe: Column Labels| From | Sent On | Attachments |
|---|---|---|
| mike markovich | 10 May 2002 14:08 | |
| JSJ Frei | 10 May 2002 16:53 | |
| Jeff Kilbride | 11 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
----- Original Message ----- From: "mike markovich" <mike...@amyskitchen.net> To: <ja...@lists.mysql.com> Sent: Friday, May 10, 2002 2:08 PM Subject: Column Labels
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
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail java...@lists.mysql.com
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.




