Bahnass
asked on
NEEDED ACCESS Statment like ALTER TABLE ttt RENAME COLUMN aaa TO bbb
A very important task
I Need to rename an access database field from VB dot net 2005
I forgot all about using DAO
if possible SQL statement
like
ALTER TABLE ttt RENAME COLUMN aaa TO bbb
that works in SQL
I Need to rename an access database field from VB dot net 2005
I forgot all about using DAO
if possible SQL statement
like
ALTER TABLE ttt RENAME COLUMN aaa TO bbb
that works in SQL
ASKER
thx dear but
CHANGE is not a reserved word in ACCESS SQL
CHANGE is not a reserved word in ACCESS SQL
you need to add a reference to the ADO Extensions for Security and Data Definition (ADOX)
then you can use the ADOX.Catalog and ADOX.Table objects
AW
then you can use the ADOX.Catalog and ADOX.Table objects
AW
ASKER
Don't know how to do for vb 2005
ASKER
Sorry I repated it
on
https://www.experts-exchange.com/questions/22078122/RENAME-ACCESS-DB-FIELD-BY-SQL-Statment.html
and had the answer
I believe the only way you can accomplish this is by:
1) Adding a column:
ALTER TABLE yourTableName ADD COLUMN NewName datatype(size)
2) Run an update statement to copy the data from the old column to the new one:
UPDATE yourTableName SET NewName = OldName
3) Then drop the old column:
ALTER TABLE yourTableName DROP COLUMN OldName
on
https://www.experts-exchange.com/questions/22078122/RENAME-ACCESS-DB-FIELD-BY-SQL-Statment.html
and had the answer
I believe the only way you can accomplish this is by:
1) Adding a column:
ALTER TABLE yourTableName ADD COLUMN NewName datatype(size)
2) Run an update statement to copy the data from the old column to the new one:
UPDATE yourTableName SET NewName = OldName
3) Then drop the old column:
ALTER TABLE yourTableName DROP COLUMN OldName
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear maralans
Just wanted to say thank U with these 500 point
Just wanted to say thank U with these 500 point
ALTER TABLE ttt CHANGE COLUMN aaa bbb INT NOT NULL;