Create Table SQL Statement (SQL Server Import and Export Wizard)
If you select Create destination table and then select Edit SQL in the Column Mappings dialog box, the SQL Server Import and Export Wizard shows the Create Table SQL Statement dialog box. On this page, you review and optionally customize the CREATE TABLE command that the wizard will run to create the new destination table.
If you're looking for info about the Transact-SQL CREATE TABLE statement, and not about the Create Table SQL Statement dialog box of the SQL Server Import and Export Wizard, see CREATE TABLE (Transact-SQL).
Screen shot of the Create Table SQL Statement page
The following screen shot shows the Create Table SQL Statement dialog box of the Wizard.
In this example, the SQL statement box contains the default CREATE TABLE statement generated by the wizard. This statement creates a new destination table named Person.AddressNew that's a copy of the Person.Address source table.
Review or regenerate the CREATE TABLE statement
Displays the auto-generated SQL statement and lets you customize it.
If you change the default CREATE TABLE command, you may also have to make changes to the associated column mappings when you return to the Column Mappings dialog box.
To include a carriage return in the text of the SQL statement, press CTRL+ENTER. If you press ENTER alone, the dialog box closes.
For more info about the CREATE TABLE statement and syntax, see CREATE TABLE (Transact-SQL).
Restore the default SQL statement, if you've changed it, by clicking Auto Generate.
Create a table that includes a FILESTREAM column
The SQL Server Import and Export Wizard generates a default CREATE TABLE statement based on the connected data source. This default CREATE TABLE statement does not include the FILESTREAM attribute even if the source table has a FILESTREAM column.
- To copy a FILESTREAM column by using the wizard, first implement FILESTREAM storage on the destination database.
- Then, add the FILESTREAM attribute manually to the CREATE TABLE statement in the Create Table SQL Statement dialog box.
After you review and customize the CREATE TABLE command and click OK, the Create Table SQL Statement dialog box returns you to the Column Mappings dialog box. For more info, see Column Mappings.