[thelist] Help w/SQL Modify Table

Joel Morris joelm at citycent.com
Tue Jul 11 22:44:26 CDT 2000


I just had to do this exact thing this last week - my first time, too :0

Per "SAMS Teach Yourself SQL in 10 Minutes" by Ben Forta (great book by the
way), the standard SQL statement is:

ALTER TABLE [table name] ADD [column name] CHAR(n);

example: ALTER TABLE Vendors ADD vend_phone CHAR(20);

Since I was using an Access database, I checked the Help file and found that
I could also specify the data type of the field - text, currency, etc.

In Access97 my exact command was:

SQL = "ALTER TABLE Products ADD COLUMN " & strCustomerPrice & " CURRENCY"
rsExtranet.Open SQL, connSearch, , , adCmdText

I don't know how to translate this into CFML, but HTH.

Best, Joel
----------------------------
CityCenter Co.
Web Development & Marketing
mailto:joelm at citycent.com
http://www.citycent.com



> 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.
>
> Best regards,
> Palyne





More information about the thelist mailing list