Export (0) Print
Expand All
ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize

Transact-SQL Reference

Transact-SQL Overview
Transact-SQL Syntax Conventions
New and Enhanced Features in Transact-SQL
+ (Add)
+ (Positive)
+ (String Concatenation)
- (Negative)
- (Subtract)
* (Multiply)
/ (Divide)
% (Modulo)
% (Wildcard - Character(s) to Match)
& (Bitwise AND)
| (Bitwise OR)
^ (Bitwise Exclusive OR)
~ (Bitwise NOT)
= (Equals)
> (Greater Than)
< (Less Than)
>= (Greater Than or Equal To)
<= (Less Than or Equal To)
<> (Not Equal To)
!< (Not Less Than)
!= (Not Equal To)
!> (Not Greater Than)
-- (Comment)
/*...*/ (Comment)
[ ] (Wildcard - Character(s) to Match)
[^] (Wildcard - Character(s) Not to Match)
_ (Wildcard - Match One Character)
@@CONNECTIONS
@@CPU_BUSY
@@CURSOR_ROWS
@@DATEFIRST
@@DBTS
@@ERROR
@@FETCH_STATUS
@@IDENTITY
@@IDLE
@@IO_BUSY
@@LANGID
@@LANGUAGE
@@LOCK_TIMEOUT
@@MAX_CONNECTIONS
@@MAX_PRECISION
@@NESTLEVEL
@@OPTIONS
@@PACK_RECEIVED
@@PACK_SENT
@@PACKET_ERRORS
@@PROCID
@@REMSERVER
@@ROWCOUNT
@@SERVERNAME
@@SERVICENAME
@@SPID
@@TEXTSIZE
@@TIMETICKS
@@TOTAL_ERRORS
@@TOTAL_READ
@@TOTAL_WRITE
@@TRANCOUNT
@@VERSION
ABS
ACOS
ALL
ALTER DATABASE
ALTER FUNCTION
ALTER PROCEDURE
ALTER TABLE
ALTER TRIGGER
ALTER VIEW
AND
ANY
APP_NAME
ASCII
ASIN
ATAN
ATN2
AVG
BACKUP
BEGIN...END
BEGIN DISTRIBUTED TRANSACTION
BEGIN TRANSACTION
BETWEEN
binary and varbinary
BINARY_CHECKSUM
bit
BREAK
BULK INSERT
CASE
CAST and CONVERT
CEILING
char and varchar
CHAR
CHARINDEX
CHECKPOINT
CHECKSUM
CHECKSUM_AGG
CLOSE
COALESCE
COLLATE
COLLATIONPROPERTY
COL_LENGTH
COL_NAME
COLUMNPROPERTY
COMMIT TRANSACTION
COMMIT WORK
Constants
CONTAINS
CONTAINSTABLE
CONTINUE
Control-of-Flow Language
COS
COT
COUNT
COUNT_BIG
CREATE DATABASE
CREATE DEFAULT
CREATE FUNCTION
CREATE INDEX
CREATE PROCEDURE
CREATE RULE
CREATE SCHEMA
CREATE STATISTICS
CREATE TABLE
CREATE TRIGGER
CREATE VIEW
CURRENT_TIMESTAMP
CURRENT_USER
cursor
CURSOR_STATUS
Cursors
DATABASEPROPERTY
DATABASEPROPERTYEX
Data Types
DATALENGTH
DATEADD
DATEDIFF
DATENAME
DATEPART
datetime and smalldatetime
DAY
DB_ID
DB_NAME
DBCC
DEALLOCATE
decimal and numeric
DECLARE @local_variable
DECLARE CURSOR
DEGREES
DELETE
DENY
DIFFERENCE
DROP DATABASE
DROP DEFAULT
DROP FUNCTION
DROP INDEX
DROP PROCEDURE
DROP RULE
DROP STATISTICS
DROP TABLE
DROP TRIGGER
DROP VIEW
DUMP
ELSE (IF...ELSE)
END (BEGIN...END)
EXECUTE
EXISTS
EXP
Expressions
FETCH
FILE_ID
FILE_NAME
FILEGROUP_ID
FILEGROUP_NAME
FILEGROUPPROPERTY
FILEPROPERTY
float and real
FLOOR
fn_get_sql
fn_helpcollations
fn_listextendedproperty
fn_servershareddrives
fn_trace_geteventinfo
fn_trace_getfilterinfo
fn_trace_getinfo
fn_trace_gettable
fn_virtualfilestats
fn_virtualservernodes
FORMATMESSAGE
FREETEXT
FREETEXTTABLE
FROM
FULLTEXTCATALOGPROPERTY
FULLTEXTSERVICEPROPERTY
Functions
GETANSINULL
GETDATE
GETUTCDATE
GO
GOTO
GRANT
GROUP BY
GROUPING
HAS_DBACCESS
HAVING
HOST_ID
HOST_NAME
IDENT_CURRENT
IDENT_INCR
IDENT_SEED
IDENTITY (Property)
IDENTITY (Function)
IF...ELSE
image
IN
INDEXKEY_PROPERTY
INDEXPROPERTY
INDEX_COL
Information Schema Views
INSERT
int, bigint, smallint, and tinyint
IS_MEMBER
IS_SRVROLEMEMBER
ISDATE
IS [NOT] NULL
ISNULL
ISNUMERIC
KILL
LEFT
LEN
LIKE
LOAD
LOG
LOG10
LOWER
LTRIM
MAX
MIN
money and smallmoney
MONTH
NCHAR
nchar and nvarchar
NEWID
Northwind Sample Database
NOT
ntext, text, and image
NULLIF
numeric
OBJECT_ID
OBJECT_NAME
OBJECTPROPERTY
OPEN
OPENDATASOURCE
OPENQUERY
OPENROWSET
OPENXML
Operators
OR
ORDER BY
PARSENAME
PATINDEX
PERMISSIONS
PI
POWER
Predicate
PRINT
pubs Sample Database
QUOTENAME
RADIANS
RAISERROR
RAND
READTEXT
real
RECONFIGURE
REPLACE
REPLICATE
Reserved Keywords
RESTORE
RESTORE FILELISTONLY
RESTORE HEADERONLY
RESTORE LABELONLY
RESTORE VERIFYONLY
RETURN
REVERSE
REVOKE
RIGHT
ROLLBACK TRANSACTION
ROLLBACK WORK
ROUND
ROWCOUNT_BIG
RTRIM
SAVE TRANSACTION
SCOPE_IDENTITY
Search Condition
SELECT @local_variable
SELECT
SERVERPROPERTY
SESSION_USER
SESSIONPROPERTY
SET @local_variable
SET
SETUSER
SHUTDOWN
SIGN
SIN
smalldatetime
smallint
smallmoney
SOME | ANY
SOUNDEX
SPACE
sql_variant
SQL_VARIANT_PROPERTY
SQUARE
SQRT
STATS_DATE
STDEV
STDEVP
STR
STUFF
SUBSTRING
SUM
SUSER_ID
SUSER_NAME
SUSER_SID
SUSER_SNAME
System Stored Procedures
System Tables
SYSTEM_USER
table
TAN
text
TEXTPTR
TEXTVALID
timestamp
tinyint
Trace Flags
Transactions
TRIGGER_NESTLEVEL
TRUNCATE TABLE
TYPEPROPERTY
UNICODE
UNION
uniqueidentifier
UPDATE
UPDATE STATISTICS
UPDATETEXT
UPPER
USE
USER
USER_ID
USER_NAME
VAR
varbinary
varchar
VARP
WAITFOR
WHERE
WHILE
WRITETEXT
YEAR
© 2014 Microsoft