Modify the table name and field name in an SQL statement.
Today, we have a temporary task to modify the database table name and field name in the production environment. In the past, the field names of the table names to be modified were all in
In the reconstruction of the site, the data structure is usually modified, so add, delete, add the MySQL table field is unavoidable, and sometimes for convenience, but also increase the modification of the table or field comments, the same field
In the reconstruction of the site, the data structure is usually modified, so add, delete, add the MySQL table field is unavoidable, and sometimes for convenience, but also increase the modification of the table or field comments, the same field
To modify the field type and field name in SQL Server
--Here is the complete SQL execution statement
if exists (SELECT * from syscolumns where id=object_id (' datasheet name ') and name= ' field name ')--determine if the field exists
Begin
Alter
Problem:
How do I change the field name of a table?
Jet SQL can change the field type, could you change the name of the field with Jet SQL?
Reply:
Jet SQL cannot change field names unless you use several Jet SQL to delete the field and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.