How to import access to MSSQL and access automatic number

Source: Internet
Author: User

When the ACCESS database is imported into MSSQL
One problem won't be solved
When access's "automatic number" is automatically included in MSSQL, It is the INT (4) data type, and no primary key is set, not the "id seed"
How can this problem be solved?
The "automatic number" of access can be the INT (4) in MSSQL by default. It identifies the seed and the number of IDS increases by 1.

Select source table and view during data import,
Select the table to be imported,
Click "convert" next to it"
"Create target table" is selected by default. Click "Edit SQL"
(Make sure that there is no target table in the SQL database. Otherwise, you cannot select "create destination table ")
Change the field to be generated as an identifier to the field name [int] identity (1, 1) not null.
For example:
The ID field is the identifier. The original SQL statement is: [ID] [int] not null.
Change to [ID] [int] identity (1, 1) not null
OK
Select enable ID insert"

The following operations are the same as usual: Flying ASP @ tech park
This article comes from xuexiang Network (http://www.snowhack.com)
Address: http://www.snowhack.com/asp/aspxg/tosql/mssqlxg/200901/957.html
Xueyu: A combination of scripts and security, from entry to proficiency, creates the best programming learning site in China



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.