When inserting SQL server data, the auto-increment field does not need to be specified, and the field will automatically grow during insertion. However, when importing data from the Database Enterprise Manager, the auto-increment fields imported to the target table are the same as those of the source table. That is to say, the source table data cannot be imported, instead of increasing the number of self-incrementing fields as the data is inserted. In this case, you need to pay attention to some issues: 1. The data of the target table involving unique fields cannot be the same as that of the source table, such as auto-increment fields and primary keys. 2. if there are multiple tables that involve auto-increment fields, there is no problem if you import a single table each time. However, if you import multiple tables that involve auto-increment fields at the same time, an error will occur, this is true for both SQL Server2000 and SQL server2005. The solution is to first change the auto-increment field of the target table to non-auto-increment. Then, when multiple tables are used for simultaneous import, it is OK, after the import, do not forget to change the auto-increment field back. Of course, you must ensure the uniqueness of the data value of the auto-increment field. Otherwise, the data value cannot be changed.
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.