Exporteren (0) Afdrukken
Alles uitvouwen
EN
Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

INSERT (Azure SQL Database)

This topic is OBSOLETE. You can find the most current version in the SQL 14 Transact-SQL Reference.

ImportantImportant
This topic is not maintained. For the current version, see INSERT.

Adds one or more new rows to a table or view.

Syntax Conventions (Azure SQL Database)


[ WITH <common_table_expression> [ ,...n ] ]
INSERT 
    [ TOP ( expression ) [ PERCENT ] ] 
    [ INTO ] 
    { <object> 
      [ WITH ( <Table_Hint_Limited> [ ...n ] ) ]
    }
{
    [ ( column_list ) ] 
    [ <OUTPUT Clause> ]
    { VALUES ( { DEFAULT | NULL | expression } [ ,...n ] ) [ ,...n ] 
    | derived_table 
    | execute_statement
        | <dml_table_source>
    | DEFAULT VALUES 
    } 
} 
[; ]

<object> ::=
{ 
    [schema_name. ]
    table_or_view_name
}

<dml_table_source> ::=
        SELECT <select_list>
        FROM ( <dml_statement_with_output_clause> ) 
            [AS] table_alias [ ( column_alias [ ,...n ] ) ]
        [ WHERE <search_condition> ]
            [ OPTION ( <query_hint> [ ,...n ] ) ]

This syntax diagram demonstrates the supported arguments and options in Microsoft Microsoft Azure SQL Database.

Microsoft Azure SQL Database does not support the following arguments and options when using the INSERT statement:

  • With three- and four-part names.

  • With theOPENQUERY or OPENROWSET options.

For more information about the arguments and the INSERT statement, see INSERT in SQL Server Books Online.

Community-inhoud

Weergeven:
© 2014 Microsoft