[thelist] Help w/SQL Modify Table

Daniel J. Cody dcody at oracular.com
Tue Jul 11 21:15:04 CDT 2000


If all you wanna do is add a column, try this:

alter table foo ( add bar varchar2(50));

that will add a column named 'bar' to table 'foo' with a datatype of
'varchar2' that has a size of '50'.

Mix to taste.

.djc.

Palyne Gaenir wrote:
> 
> Hi Evoltians,
> 
> I know this is SO basic, but amazingly enough, I've never had to do
> it, maybe because I've only been doing CFML for about 1.5 years.  I
> need to modify one of my tables -- add a column.  I'm searching
> Forta's book, my SQL book, and zillions of online tutorials.  There
> are a million versions of how to create a table, but I can't find an
> example of how to MODIFY one (in SQL Server).  I have lots of data in
> the table and I don't want to lose it.  I don't want to make a new
> table, call it into the new table, delete the old table, remake the
> old table right, call the data back in... I am super-pressed on a
> deadline that hits early tomorrow morning, have tons of work, and I
> am just flat out of time for finding this.  I am hoping that someone
> on this list will have mercy and just give me the code?  I promise to
> dredge up some useful tips as soon as this deadline passes.




More information about the thelist mailing list