wood burning stoves*
The moose likes JDBC and the fly likes urgent !!!!  need the right  sql method to add new column into exist table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "urgent !!!!  need the right  sql method to add new column into exist table" Watch "urgent !!!!  need the right  sql method to add new column into exist table" New topic
Author

urgent !!!! need the right sql method to add new column into exist table

yossi avisror
Greenhorn

Joined: May 07, 2001
Posts: 4
i would like to get the right sql method to add new column into exist table
(i am using mysql server).
Daniel Dunleavy
Ranch Hand

Joined: Mar 13, 2001
Posts: 276
Don't know mysql..but in oracle...alter table add colname char
yossi avisror
Greenhorn

Joined: May 07, 2001
Posts: 4
thankes Daniel you realy helped me

David DeCesare
Greenhorn

Joined: May 25, 2001
Posts: 13
One additional feature that MySQL has is the ability to add a new column next to an existing column (rather than being slapped at the end):
ALTER TABLE tableName ADD newColumnName VARCHAR(32) NOT NULL AFTER existingColumnName
Hope that helps.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: urgent !!!! need the right sql method to add new column into exist table
 
Similar Threads
JSP - JDBC alter column automatically
data migration query
Exception Handling
JSP - JDBC alter columns automatically
Runtime Creating Tables