Edit

Share via


Create Table SQL Statement (SQL Server Import and Export Wizard)

Applies to: SQL Server SSIS Integration Runtime in Azure Data Factory

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.

Note

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.

Create table page of the Import and Export Wizard

Review or regenerate the CREATE TABLE statement

SQL 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).

Autogenerate
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.

  1. To copy a FILESTREAM column by using the wizard, first implement FILESTREAM storage on the destination database.
  2. Then, add the FILESTREAM attribute manually to the CREATE TABLE statement in the Create Table SQL Statement dialog box.

For more info about the syntax, see CREATE TABLE (Transact-SQL). For more info about FILESTREAM, see Binary Large Object (Blob) Data (SQL Server).

What's next?

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.

See also

Get started with this simple example of the Import and Export Wizard