Export (0) Print
Expand All

Transact-SQL Syntax Conventions (Transact-SQL)



Used for


Transact-SQL keywords.


User-supplied parameters of Transact-SQL syntax.





| (vertical bar)


[ ] (brackets)

Optional syntax items. Do not type the brackets.

{ } (braces)

Required syntax items. Do not type the braces.






Transact-SQL statement terminator.Although the semicolon is not required for most statements in this version of SQL Server, it will be required in a future version.

<label> ::=




server_name .[database_name].[schema_name].object_name

| database_name.[schema_name].object_name

| schema_name.object_name

| object_name


Specifies a linked server name or remote server name.






Refers to the name of the object.


Note Note



Object reference format


server . database . schema . object

Four-part name.

server . database .. object

Schema name is omitted.

server .. schema . object

Database name is omitted.

server ... object

Database and schema name are omitted.

database . schema . object

Server name is omitted.

database .. object

Server and schema name are omitted.

schema . object

Server and database name are omitted.


Server, database, and schema name are omitted.










The Transact-SQL reference includes topics related to SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, and Azure SQL Database. Near the top of each topic is a section indicating which products support the subject of the topic. If a product is omitted, then the feature described by the topic is not available in that product. For example, availability groups were introduced in SQL Server 2012. The CREATE AVAILABILTY GROUP topic indicates it applies to SQL Server (SQL Server 2012 through current version) because it does not apply to SQL Server 2008, SQL Server 2008 R2, or Azure SQL Database.

In some cases, the general subject of topic can be used in a product, but all of the arguments are not supported. For example, contained database users were introduced in SQL Server 2012. The CREATE USER statement can be used in any SQL Server product, however the WITH PASSWORD syntax cannot be used with older versions. In this case, additional Applies to sections are inserted into the appropriate argument descriptions in the body of the topic.

Community Additions

© 2014 Microsoft