How to usa ALTER COLUMN to change a column name


G

Guest

Hi,

I´m trying to change the column name using ALTER TABLE, but I didn´t find
any example how can I do that. Could you help me?
 
Ad

Advertisements

G

Guest

Try a different approach

Function FunctionName()

Dim MyDb as Dao.database
Dim MyRec as Dao.TableDef
Dim FldName as DAO.Field

Set MyDb=codedb()
Set MyRec = MyDb.TableDefs("TableName")
Set FldName = Myrec!FieldName

FldName.name = "New name"

End Function
 
Ad

Advertisements

P

peregenem

Robson_Brasil said:
I´m trying to change the column name using ALTER TABLE
ALTER TABLE Customers ADD Telephone VARCHAR(24)
;
UPDATE Customers SET Telephone = Phone
;
ALTER TABLE Customers DROP Phone
;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top