Quote:
Originally Posted by spazband
I am in the process of writing a utility that will allow for database modifications via SQL. One of the issues I am up against is how to rename a field inside of a table using SQL. This needs to be done because I have to set an index on a field named 'Year' and since this is a key word with Access, the sql statement is giving me fits. I have to rename the field, set the index then rename it back. Everything is done except for the renaming of the field.
|
to rename
for eg chenge column name for fnmae to fname in table employee
step 1 rename employee to employe
step 2 create table employee (fname,lname , and other columns of table) as select * from employe.
then drop employe
and add constraints againn to employee if any exist.
alter table do not change name of column , table and size of column if table data exist