How to rename tables and fields using SQL?

  • Thread starter Thread starter Laser Lu
  • Start date Start date
L

Laser Lu

Can tables and fiels be renamed in SQL? How to rename those schema objects
by using DDL?
 
Hi,
To rename a field, you have to first create a new field with the name you want,
copy all the data from the old field to the new, then drop the old field.

For exact syntax, look up Alter Table in Help. You can use an Update statement to
copy the data.
 
Tank you, Dan!
Then how about rename a table? Create a new table and then copy the data
from the original table into the new table using the SELECT statement?
Right?

And since there is no good solution on SQL, is there any other programable
interfaces for renaming tables and fields?
 

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

Back
Top