DELETE syntax
SELECT syntax
UPDATE syntax
INSERT Statement Syntax Diagram
Place the cursor on any keyword to see the definition in a pop-up window.
(IE4+, IE5+, beta IE6, N4+)
INSERT
[
INTO
]
{
[
database.
]
[
owner.
]
table_name
[
WITH (
INDEX ( Index_1,
[
index_2,
...,
n
]
)
|
FASTFIRSTROW
|
HOLDLOCK
|
PAGLOCK
|
READCOMMITTED
|
REPEATABLEREAD
|
ROWLOCK
|
SERIALIZABLE
|
TABLOCK
|
TABLOCKX
[ ...
n
| ...,
n
]
)
]
|
OPENQUERY( server, 'query' )
|
OPENROWSET( 'provider_name',
'datasource';'user_id';'password', 'provider_string',
[
catalog.
]
[
schema.
]
object
|
'query'
)
|
view_name
}
{
( column_1,
[
column_2,
...,
n
]
)
VALUES
(
DEFAULT
|
NULL
|
expression,
[ ...,
n
]
)
|
DEFAULT VALUES
|
execute_statement
|
select_statement
}
Key to blue and red text in syntax diagram
KEYWORDS
Keywords are denoted denoted with upper case letters. Obey the spelling.
variables
All user-supplied variables are denoted with lower case letters.
...,
n
Signifies that there can be more than one value in a comma delimited list. Note that the dots and
n
are not part of the code and must not appear in the SQL query.
...
n
Signifies that there can be more than one value in a blank space delimited list. Note that the dots and
n
are not part of the code and must not appear in the SQL query.
{ }
Signifies that all, or some portion, of the code elements between the braces are required elements and must appear in the SQL query. Note that these braces are not part of the code and must not appear in the SQL query.
[ ]
Signifies that the code elements between the square brackets can optionally appear in the SQL query, but are not required. Note that these brackets are not part of the code and must not appear in the SQL query.
|
The or symbol signifies that you may use only one of the code elements or values from the possible choices. Note that the or symbol is not part of the code and must not appear in the SQL query.
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information