Strona główna MSSQL C++ Hardware HTML i javascript Java Software SQL

MSSQL - tablica słów kluczowych SQL.

Dodano: 2011-06-11

Tablica słów kluczowych języka SQL z krótkim opisem ich znaczenia (w języku angielskim). Dokładny opis można znaleźć na stronie Transact-SQL Syntax Conventions .

Słowo kluczowe. Krótki opis.
+ (Add) Adds two numbers. This addition arithmetic operator can also add a number, in days, to a date.
+ (Positive) A unary operator that returns the positive value of a numeric expression (a unary operator).
+ (String Concatenation) An operator in a string expression that concatenates two or more character or binary strings, columns, or a combination of strings and column names into one expression (a string operator).
- (Negative) Is a unary operator that returns the negative value of a numeric expression (a unary operator).
- (Subtract) Subtracts two numbers. This subtraction arithmetic operator can also subtract a number, in days, from a date.
* (Multiply) Multiplies two expressions (an arithmetic multiplication operator).
/ (Divide) Divides one number by another (an arithmetic division operator).
% (Modulo) Provides the remainder of one number divided by another.
% (Wildcard - Character(s) to Match) Matches any string of zero or more characters. This wildcard character can be used as either a prefix or a suffix.
& (Bitwise AND) Performs a bitwise logical AND operation between two integer values.
| (Bitwise OR) Performs a bitwise logical OR operation between two given integer values as translated to binary expressions within Transact-SQL statements.
^ (Bitwise Exclusive OR) Performs a bitwise exclusive OR operation between two given integer values as translated to binary expressions within Transact-SQL statements.
~ (Bitwise NOT) Performs a bitwise logical NOT operation for one given integer value as translated to binary expressions within Transact-SQL statements.
= (Equals) Compares two expressions (a comparison operator). When you compare nonnull expressions, the result is TRUE if both operands are equal; otherwise, the result is FALSE. If either or both operands are NULL and SET ANSI_NULLS is set to ON, the result is NULL. If SET ANSI_NULLS is set to OFF, the result is FALSE if one of the operands is NULL, and TRUE if both operands are NULL.
> (Greater Than) Compares two expressions (a comparison operator). When you compare nonnull expressions, the result is TRUE if the left operand has a higher value than the right operand; otherwise, the result is FALSE. If either or both operands are NULL and SET ANSI_NULLS is set to ON, the result is NULL. If SET ANSI_NULLS is set to OFF, the result is FALSE if one of the operands is NULL, and TRUE if both operands are NULL.
< (Less Than) Compares two expressions (a comparison operator). When you compare nonnull expressions, the result is TRUE if the left operand has a lower value than the right operand; otherwise, the result is FALSE. If either or both operands are NULL and SET ANSI_NULLS is set to ON, the result is NULL. If SET ANSI_NULLS is set to OFF, the result is FALSE if one of the operands is NULL, and TRUE if both operands are NULL.
>= (Greater Than or Equal To) Compares two expressions (a comparison operator). When you compare nonnull expressions, the result is TRUE if the left operand has a higher or equal value than the right operand; otherwise, the result is FALSE. If either or both operands are NULL and SET ANSI_NULLS is set to ON, the result is NULL. If SET ANSI_NULLS is set to OFF, the result is FALSE if one of the operands is NULL, and TRUE if both operands are NULL.
<= (Less Than or Equal To) Compares two expressions (a comparison operator). When you compare nonnull expressions, the result is TRUE if the left operand has a lower or equal value than the right operand; otherwise, the result is FALSE. If either or both operands are NULL and SET ANSI_NULLS is set to ON, the result is NULL. If SET ANSI_NULLS is set to OFF, the result is FALSE if one of the operands is NULL, and TRUE if both operands are NULL.
<> (Not Equal To) Compares two expressions (a comparison operator). When you compare nonnull expressions, the result is TRUE if the left operand is not equal to the right operand; otherwise, the result is FALSE. If either or both operands are NULL and SET ANSI_NULLS is set to ON, the result is NULL. If SET ANSI_NULLS is set to OFF, the result is FALSE if one of the operands is NULL, and TRUE if both operands are NULL.
!< (Not Less Than) Compares two expressions (a comparison operator). When you compare nonnull expressions, the result is TRUE if the left operand does not have a lower value than the right operand; otherwise, the result is FALSE. If either or both operands are NULL and SET ANSI_NULLS is set to ON, the result is NULL. If SET ANSI_NULLS is set to OFF, the result is FALSE if one of the operands is NULL, and TRUE if both operands are NULL.
!= (Not Equal To) Tests whether one expression is not equal to another expression (a comparison operator). Functions the same as the Not Equal To (<>) comparison operator.
!> (Not Greater Than) Compares two expressions (a comparison operator). When you compare nonnull expressions, the result is TRUE if the left operand does not have a higher value than the right operand; otherwise, the result is FALSE. If either or both operands are NULL and SET ANSI_NULLS is set to ON, the result is NULL. If SET ANSI_NULLS is set to OFF, the result is FALSE if one of the operands is NULL, and TRUE if both operands are NULL.
-- (Comment) Indicates user-provided text. Comments can be inserted on a separate line, nested (-- only) at the end of a Transact-SQL command line, or within a Transact-SQL statement. The comment is not evaluated by the server. Two hyphens (--) is the SQL-92 standard indicator for comments.
/*...*/ (Comment) Indicates user-provided text. The text between the /* and */ commenting characters is not evaluated by the server.
[ ] (Wildcard - Character(s) to Match) Matches any single character within the specified range or set that is specified inside the square brackets.
[^] (Wildcard - Character(s) Not to Match) Matches any single character not within the specified range or set that is specified inside the square brackets.
_ (Wildcard - Match One Character) Matches any single character, and can be used as either a prefix or suffix.
@@CONNECTIONS Returns the number of connections, or attempted connections, since Microsoft® SQL Server™ was last started.
@@CPU_BUSY Returns the time in milliseconds (based on the resolution of the system timer) that the CPU has spent working since Microsoft® SQL Server™ was last started.
@@CURSOR_ROWS Returns the number of qualifying rows currently in the last cursor opened on the connection. To improve performance, Microsoft® SQL Server™ can populate large keyset and static cursors asynchronously. @@CURSOR_ROWS can be called to determine that the number of the rows that qualify for a cursor are retrieved at the time @@CURSOR_ROWS is called.
@@DATEFIRST Returns the current value of the SET DATEFIRST parameter, which indicates the specified first day of each week: 1 for Monday, 3 for Wednesday, and so on through 7 for Sunday.
@@DBTS Returns the value of the current timestamp data type for the current database. This timestamp is guaranteed to be unique in the database.
@@ERROR Returns the error number for the last Transact-SQL statement executed.
@@FETCH_STATUS Returns the status of the last cursor FETCH statement issued against any cursor currently opened by the connection.
@@IDENTITY Returns the last-inserted identity value.
@@IDLE Returns the time in milliseconds (based on the resolution of the system timer) that Microsoft® SQL Server™ has been idle since last started.
@@IO_BUSY Returns the time in milliseconds (based on the resolution of the system timer) that Microsoft® SQL Server™ has spent performing input and output operations since it was last started.
@@LANGID Returns the local language identifier (ID) of the language currently in use.
@@LANGUAGE Returns the name of the language currently in use.
@@LOCK_TIMEOUT Returns the current lock time-out setting, in milliseconds, for the current session.
@@MAX_CONNECTIONS Returns the maximum number of simultaneous user connections allowed on a Microsoft® SQL Server™. The number returned is not necessarily the number currently configured.
@@MAX_PRECISION Returns the precision level used by decimal and numeric data types as currently set in the server.
@@NESTLEVEL Returns the nesting level of the current stored procedure execution (initially 0).
@@OPTIONS Returns information about current SET options.
@@PACK_RECEIVED Returns the number of input packets read from the network by Microsoft® SQL Server™ since last started.
@@PACK_SENT Returns the number of output packets written to the network by Microsoft® SQL Server™ since last started.
@@PACKET_ERRORS Returns the number of network packet errors that have occurred on Microsoft® SQL Server™ connections since SQL Server was last started.
@@PROCID Returns the stored procedure identifier (ID) of the current procedure.
@@REMSERVER Returns the name of the remote Microsoft® SQL Server™ database server as it appears in the login record.
@@ROWCOUNT Returns the number of rows affected by the last statement.
@@SERVERNAME Returns the name of the local server running Microsoft® SQL Server™.
@@SERVICENAME Returns the name of the registry key under which Microsoft® SQL Server™ is running. @@SERVICENAME returns MSSQLServer if the current instance is the default instance; this function returns the instance name if the current instance is a named instance.
@@SPID Returns the server process identifier (ID) of the current user process.
@@TEXTSIZE Returns the current value of the TEXTSIZE option of the SET statement, which specifies the maximum length, in bytes, of text or image data that a SELECT statement returns.
@@TIMETICKS Returns the number of microseconds per tick.
@@TOTAL_ERRORS Returns the number of disk read/write errors encountered by Microsoft® SQL Server™ since last started.
@@TOTAL_READ Returns the number of disk reads (not cache reads) by Microsoft® SQL Server™ since last started.
@@TOTAL_WRITE Returns the number of disk writes by Microsoft® SQL Server™ since last started.
@@TRANCOUNT Returns the number of active transactions for the current connection.
@@VERSION Returns the date, version, and processor type for the current installation of Microsoft® SQL Server™.
ABS Returns the absolute, positive value of the given numeric expression.
ACOS Returns the angle, in radians, whose cosine is the given float expression; also called arccosine.
ALL Compares a scalar value with a single-column set of values.
ALTER DATABASE Adds or removes files and filegroups from a database. Can also be used to modify the attributes of files and filegroups, such as changing the name or size of a file. ALTER DATABASE provides the ability to change the database name, filegroup names, and the logical names of data files and log files.
ALTER FUNCTION Alters an existing user-defined function, previously created by executing the CREATE FUNCTION statement, without changing permissions and without affecting any dependent functions, stored procedures, or triggers.
ALTER PROCEDURE Alters a previously created procedure, created by executing the CREATE PROCEDURE statement, without changing permissions and without affecting any dependent stored procedures or triggers. For more information about the parameters used in the ALTER PROCEDURE statement, see CREATE PROCEDURE.
ALTER TABLE Modifies a table definition by altering, adding, or dropping columns and constraints, or by disabling or enabling constraints and triggers.
ALTER TRIGGER Alters the definition of a trigger created previously by the CREATE TRIGGER statement. For more information about the parameters used in the ALTER TRIGGER statement, see CREATE TRIGGER.
ALTER VIEW Alters a previously created view (created by executing CREATE VIEW), including indexed views, without affecting dependent stored procedures or triggers and without changing permissions. For more information about the parameters used in the ALTER VIEW statement, see CREATE VIEW.
AND Combines two Boolean expressions and returns TRUE when both expressions are TRUE. When more than one logical operator is used in a statement, AND operators are evaluated first. You can change the order of evaluation by using parentheses.
ANY Compares a scalar value with a single-column set of values. For more information, see SOME | ANY.
APP_NAME Returns the application name for the current session if set by the application.
ASCII Returns the ASCII code value of the leftmost character of a character expression.
ASIN Returns the angle, in radians, whose sine is the given float expression (also called arcsine).
ATAN Returns the angle in radians whose tangent is the given float expression (also called arctangent).
ATN2 Returns the angle, in radians, whose tangent is between the two given float expressions (also called arctangent).
AVG Returns the average of the values in a group. Null values are ignored.
BACKUP Backs up an entire database, transaction log, or one or more files or filegroups. For more information about database backup and restore operations, see Backing Up and Restoring Databases.
BEGIN...END Encloses a series of Transact-SQL statements so that a group of Transact-SQL statements can be executed. BEGIN and END are control-of-flow language keywords.
BEGIN DISTRIBUTED TRANSACTION Specifies the start of a Transact-SQL distributed transaction managed by Microsoft Distributed Transaction Coordinator (MS DTC).
BEGIN TRANSACTION Marks the starting point of an explicit, local transaction. BEGIN TRANSACTION increments @@TRANCOUNT by 1.
BETWEEN Specifies a range to test.
binary and varbinary Binary data types of either fixed-length (binary) or variable-length (varbinary).
BINARY_CHECKSUM Returns the binary checksum value computed over a row of a table or over a list of expressions. BINARY_CHECKSUM can be used to detect changes to a row of a table.
bit Integer data type 1, 0, or NULL.
BREAK Exits the innermost WHILE loop. Any statements following the END keyword are ignored. BREAK is often, but not always, activated by an IF test.
BULK INSERT Copies a data file into a database table or view in a user-specified format.
CASE Evaluates a list of conditions and returns one of multiple possible result expressions.
CAST and CONVERT Explicitly converts an expression of one data type to another. CAST and CONVERT provide similar functionality.
CEILING Returns the smallest integer greater than, or equal to, the given numeric expression.
char and varchar Fixed-length (char) or variable-length (varchar) character data types.
CHAR A string function that converts an int ASCII code to a character.
CHARINDEX Returns the starting position of the specified expression in a character string.
CHECKPOINT Forces all dirty pages for the current database to be written to disk. Dirty pages are data or log pages modified after entered into the buffer cache, but the modifications have not yet been written to disk. For more information about log truncation, see Truncating the Transaction Log.
CHECKSUM Returns the checksum value computed over a row of a table, or over a list of expressions. CHECKSUM is intended for use in building hash indices.
CHECKSUM_AGG Returns the checksum of the values in a group. Null values are ignored.
CLOSE Closes an open cursor by releasing the current result set and freeing any cursor locks held on the rows on which the cursor is positioned. CLOSE leaves the data structures accessible for reopening, but fetches and positioned updates are not allowed until the cursor is reopened. CLOSE must be issued on an open cursor; it is not allowed on cursors that have only been declared or are already closed.
COALESCE Returns the first nonnull expression among its arguments.
COLLATE A clause that can be applied to a database definition or a column definition to define the collation, or to a character string expression to apply a collation cast.
COLLATIONPROPERTY Returns the property of a given collation.
COL_LENGTH Returns the defined length (in bytes) of a column.
COL_NAME Returns the name of a database column given the corresponding table identification number and column identification number.
COLUMNPROPERTY Returns information about a column or procedure parameter.
COMMIT TRANSACTION Marks the end of a successful implicit or user-defined transaction. If @@TRANCOUNT is 1, COMMIT TRANSACTION makes all data modifications performed since the start of the transaction a permanent part of the database, frees the resources held by the connection, and decrements @@TRANCOUNT to 0. If @@TRANCOUNT is greater than 1, COMMIT TRANSACTION decrements @@TRANCOUNT only by 1.
COMMIT WORK Marks the end of a transaction.
Constants A constant, also known as a literal or a scalar value, is a symbol that represents a specific data value. The format of a constant depends on the data type of the value it represents.
CONTAINS
CONTAINSTABLE Returns a table of zero, one, or more rows for those columns containing character-based data types for precise or fuzzy (less precise) matches to single words and phrases, the proximity of words within a certain distance of one another, or weighted matches. CONTAINSTABLE can be referenced in the FROM clause of a SELECT statement as if it were a regular table name.
CONTINUE Restarts a WHILE loop. Any statements after the CONTINUE keyword are ignored. CONTINUE is often, but not always, activated by an IF test. For more information, see WHILE and Control-of-Flow Language.
Control-of-Flow Language The table shows the Transact-SQL control-of-flow keywords.
COS A mathematic function that returns the trigonometric cosine of the given angle (in radians) in the given expression.
COT A mathematic function that returns the trigonometric cotangent of the specified angle (in radians) in the given float expression.
COUNT Returns the number of items in a group.
COUNT_BIG Returns the number of items in a group. COUNT_BIG works like the COUNT function. The only difference between them is their return values: COUNT_BIG always returns a bigint data type value. COUNT always returns an int data type value.
CREATE DATABASE Creates a new database and the files used to store the database, or attaches a database from the files of a previously created database.
CREATE DEFAULT Creates an object called a default. When bound to a column or a user-defined data type, a default specifies a value to be inserted into the column to which the object is bound (or into all columns, in the case of a user-defined data type) when no value is explicitly supplied during an insert. Defaults, a backward compatibility feature, perform some of the same functions as default definitions created using the DEFAULT keyword of ALTER or CREATE TABLE statements. Default definitions are the preferred, standard way to restrict column data because the definition is stored with the table and automatically dropped when the table is dropped. A default is beneficial, however, when the default is used multiple times for multiple columns.
CREATE FUNCTION Creates a user-defined function, which is a saved Transact-SQL routine that returns a value. User-defined functions cannot be used to perform a set of actions that modify the global database state. User-defined functions, like system functions, can be invoked from a query. They also can be executed through an EXECUTE statement like stored procedures.
CREATE INDEX Creates an index on a given table or view.
CREATE PROCEDURE Creates a stored procedure, which is a saved collection of Transact-SQL statements that can take and return user-supplied parameters.
CREATE RULE Creates an object called a rule. When bound to a column or a user-defined data type, a rule specifies the acceptable values that can be inserted into that column. Rules, a backward compatibility feature, perform some of the same functions as check constraints. CHECK constraints, created using the CHECK keyword of ALTER or CREATE TABLE, are the preferred, standard way to restrict the values in a column (multiple constraints can be defined on one or multiple columns). A column or user-defined data type can have only one rule bound to it. However, a column can have both a rule and one or more check constraints associated with it. When this is true, all restrictions are evaluated.
CREATE SCHEMA Creates a schema that can be thought of as a conceptual object containing definitions of tables, views, and permissions.
CREATE STATISTICS Creates a histogram and associated density groups (collections) over the supplied column or set of columns.
CREATE TABLE Creates a new table.
CREATE TRIGGER Creates a trigger, which is a special kind of stored procedure that executes automatically when a user attempts the specified data-modification statement on the specified table. Microsoft® SQL Server™ allows the creation of multiple triggers for any given INSERT, UPDATE, or DELETE statement.
CREATE VIEW Creates a virtual table that represents the data in one or more tables in an alternative way. CREATE VIEW must be the first statement in a query batch.
CURRENT_TIMESTAMP Returns the current date and time. This function is equivalent to GETDATE().
CURRENT_USER Returns the current user. This function is equivalent to USER_NAME().
cursor A data type for variables or stored procedure OUTPUT parameters that contain a reference to a cursor. Any variables created with the cursor data type are nullable.
CURSOR_STATUS A scalar function that allows the caller of a stored procedure to determine whether or not the procedure has returned a cursor and result set for a given parameter.
Cursors Microsoft® SQL Server™ statements produce a complete result set, but there are times when the results are best processed one row at a time. Opening a cursor on a result set allows processing the result set one row at a time. SQL Server version 7.0 also introduces assigning a cursor to a variable or parameter with a cursor data type.
DATABASEPROPERTY Returns the named database property value for the given database and property name.
DATABASEPROPERTYEX Returns the current setting of the specified database option or property for the specified database.
Data Types In Microsoft® SQL Server™, each column, local variable, expression, and parameter has a related data type, which is an attribute that specifies the type of data (integer, character, money, and so on) that the object can hold. SQL Server supplies a set of system data types that define all of the types of data that can be used with SQL Server. The set of system-supplied data types is shown below.
DATALENGTH Returns the number of bytes used to represent any expression.
DATEADD Returns a new datetime value based on adding an interval to the specified date.
DATEDIFF Returns the number of date and time boundaries crossed between two specified dates.
DATENAME Returns a character string representing the specified datepart of the specified date.
DATEPART Returns an integer representing the specified datepart of the specified date.
datetime and smalldatetime Date and time data types for representing date and time of day.
DAY Returns an integer representing the day datepart of the specified date.
DB_ID Returns the database identification (ID) number.
DB_NAME Returns the database name.
DBCC The Transact-SQL programming language provides DBCC statements that act as Database Console Commands for Microsoft® SQL Server™ 2000. These statements check the physical and logical consistency of a database. Many DBCC statements can fix detected problems.
DEALLOCATE Removes a cursor reference. When the last cursor reference is deallocated, the data structures comprising the cursor are released by Microsoft® SQL Server™.
decimal and numeric Numeric data types with fixed precision and scale.
DECLARE @local_variable Variables are declared in the body of a batch or procedure with the DECLARE statement and are assigned values with either a SET or SELECT statement. Cursor variables can be declared with this statement and used with other cursor-related statements. After declaration, all variables are initialized as NULL.
DECLARE CURSOR Defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates. DECLARE CURSOR accepts both a syntax based on the SQL-92 standard and a syntax using a set of Transact-SQL extensions.
DEGREES Given an angle in radians, returns the corresponding angle in degrees.
DELETE Removes rows from a table.
DENY Creates an entry in the security system that denies a permission from a security account in the current database and prevents the security account from inheriting the permission through its group or role memberships.
DIFFERENCE Returns the difference between the SOUNDEX values of two character expressions as an integer.
DROP DATABASE Removes one or more databases from Microsoft® SQL Server™. Removing a database deletes the database and the disk files used by the database.
DROP DEFAULT Removes one or more user-defined defaults from the current database.
DROP FUNCTION Removes one or more user-defined functions from the current database. User-defined functions are created using CREATE FUNCTION and modified using ALTER FUNCTION.
DROP INDEX Removes one or more indexes from the current database.
DROP PROCEDURE Removes one or more stored procedures or procedure groups from the current database.
DROP RULE Removes one or more user-defined rules from the current database.
DROP STATISTICS Drops statistics for multiple collections within the specified tables (in the current database).
DROP TABLE Removes a table definition and all data, indexes, triggers, constraints, and permission specifications for that table. Any view or stored procedure that references the dropped table must be explicitly dropped by using the DROP VIEW or DROP PROCEDURE statement.
DROP TRIGGER Removes one or more triggers from the current database.
DROP VIEW Removes one or more views from the current database. DROP VIEW can be executed against indexed views.
DUMP Makes a backup copy of a database (DUMP DATABASE) or makes a copy of the transaction log (DUMP TRANSACTION) in a form that can be read into Microsoft® SQL Server™ using the BACKUP or LOAD statements.
ELSE (IF...ELSE) Imposes conditions on the execution of a Transact-SQL statement. The Transact-SQL statement (sql_statement) following the Boolean_expression is executed if the Boolean_expression evaluates to TRUE. The optional ELSE keyword is an alternate Transact-SQL statement that is executed when Boolean_expression evaluates to FALSE or NULL.
END (BEGIN...END) Encloses a series of Transact-SQL statements that will execute as a group. BEGIN...END blocks can be nested.
EXECUTE Executes a scalar-valued, user-defined function, a system procedure, a user-defined stored procedure, or an extended stored procedure. Also supports the execution of a character string within a Transact-SQL batch.
EXISTS Specifies a subquery to test for the existence of rows.
EXP Returns the exponential value of the given float expression.
Expressions A combination of symbols and operators that Microsoft® SQL Server™ evaluates to obtain a single data value. Simple expressions can be a single constant, variable, column, or scalar function. Operators can be used to join two or more simple expressions into a complex expression.
FETCH Retrieves a specific row from a Transact-SQL server cursor.
FILE_ID Returns the file identification (ID) number for the given logical file name in the current database.
FILE_NAME Returns the logical file name for the given file identification (ID) number.
FILEGROUP_ID Returns the filegroup identification (ID) number for the given filegroup name.
FILEGROUP_NAME Returns the filegroup name for the given filegroup identification (ID) number.
FILEGROUPPROPERTY Returns the specified filegroup property value when given a filegroup and property name.
FILEPROPERTY Returns the specified file name property value when given a file name and property name.
float and real Approximate number data types for use with floating point numeric data. Floating point data is approximate; not all values in the data type range can be precisely represented.
FLOOR Returns the largest integer less than or equal to the given numeric expression.
fn_get_sql Returns the text of the SQL statement for the specified SQL handle.
fn_helpcollations Returns a list of all the collations supported by Microsoft® SQL Server™ 2000.
fn_listextendedproperty Returns extended property values of database objects.
fn_servershareddrives Returns the names of shared drives used by the clustered server.
fn_trace_geteventinfo Returns information about the events traced.
fn_trace_getfilterinfo Returns information about the filters applied to a specified trace.
fn_trace_getinfo Returns information about a specified trace or existing traces.
fn_trace_gettable Returns trace file information in a table format. This system function provides a mechanism for querying trace data stored in a file (trace_filename.trc). fn_trace_gettable can be used in a SELECT...INTO statement to load the data in the file into a SQL Server table.
fn_virtualfilestats Returns I/O statistics for database files, including log files.
fn_virtualservernodes Returns the list of nodes on which the virtual server can run. Such information is useful in failover clustering environments.
FORMATMESSAGE Constructs a message from an existing message in sysmessages. The functionality of FORMATMESSAGE resembles that of the RAISERROR statement; however, RAISERROR prints the message immediately, and FORMATMESSAGE returns the edited message for further processing.
FREETEXT Is a predicate used to search columns containing character-based data types for values that match the meaning and not the exact wording of the words in the search condition. When FREETEXT is used, the full-text query engine internally "word-breaks" the freetext_string into a number of search terms and assigns each term a weight and then finds the matches.
FREETEXTTABLE Returns a table of zero, one, or more rows for those columns containing character-based data types for values that match the meaning, but not the exact wording, of the text in the specified freetext_string. FREETEXTTABLE can be referenced in the FROM clause of a SELECT statement like a regular table name.
FROM Specifies the tables, views, derived tables, and joined tables used in DELETE, SELECT, and UPDATE statements.
FULLTEXTCATALOGPROPERTY Returns information about full-text catalog properties.
FULLTEXTSERVICEPROPERTY Returns information about full-text service-level properties.
Functions
GETANSINULL Returns the default nullability for the database for this session.
GETDATE Returns the current system date and time in the Microsoft® SQL Server™ standard internal format for datetime values.
GETUTCDATE Returns the datetime value representing the current UTC time (Universal Time Coordinate or Greenwich Mean Time). The current UTC time is derived from the current local time and the time zone setting in the operating system of the computer on which SQL Server is running.
GO Signals the end of a batch of Transact-SQL statements to the Microsoft® SQL Server™ utilities.
GOTO Alters the flow of execution to a label. The Transact-SQL statement(s) following GOTO are skipped and processing continues at the label. GOTO statements and labels can be used anywhere within a procedure, batch, or statement block. GOTO statements can be nested.
GRANT Creates an entry in the security system that allows a user in the current database to work with data in the current database or execute specific Transact-SQL statements.
GROUP BY Divides a table into groups. Groups can consist of column names or results or computed columns. For more information, see SELECT.
GROUPING Is an aggregate function that causes an additional column to be output with a value of 1 when the row is added by either the CUBE or ROLLUP operator, or 0 when the row is not the result of CUBE or ROLLUP.
HAS_DBACCESS Returns information about whether the user has access to the specified database.
HAVING Specifies a search condition for a group or an aggregate. HAVING can be used only with the SELECT statement. It is usually used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause. For more information, see SELECT.
HOST_ID Returns the workstation identification number.
HOST_NAME Returns the workstation name.
IDENT_CURRENT Returns the last identity value generated for a specified table in any session and any scope.
IDENT_INCR Returns the increment value (returned as numeric(@@MAXPRECISION,0)) specified during the creation of an identity column in a table or view that has an identity column.
IDENT_SEED Returns the seed value (returned as numeric(@@MAXPRECISION,0)) specified during the creation of an identity column in a table or a view that has an identity column.
IDENTITY (Property) Creates an identity column in a table. This property is used with the CREATE TABLE and ALTER TABLE Transact-SQL statements.
IDENTITY (Function) Is used only in a SELECT statement with an INTO table clause to insert an identity column into a new table.
IF...ELSE Imposes conditions on the execution of a Transact-SQL statement. The Transact-SQL statement following an IF keyword and its condition is executed if the condition is satisfied (when the Boolean expression returns TRUE). The optional ELSE keyword introduces an alternate Transact-SQL statement that is executed when the IF condition is not satisfied (when the Boolean expression returns FALSE).
image For more information about the image data type, see ntext, text, and image.
IN Determines if a given value matches any value in a subquery or a list.
INDEXKEY_PROPERTY Returns information about the index key.
INDEXPROPERTY Returns the named index property value given a table identification number, index name, and property name.
INDEX_COL Returns the indexed column name.
Information Schema Views Microsoft® SQL Server™ 2000 provides two methods for obtaining meta data: system stored procedures or information schema views.
INSERT Adds a new row to a table or a view.
int, bigint, smallint, and tinyint Exact number data types that use integer data.
IS_MEMBER Indicates whether the current user is a member of the specified Microsoft® Windows NT® group or Microsoft SQL Server™ role.
IS_SRVROLEMEMBER Indicates whether the current user login is a member of the specified server role.
ISDATE Determines whether an input expression is a valid date.
IS [NOT] NULL Determines whether or not a given expression is NULL.
ISNULL Replaces NULL with the specified replacement value.
ISNUMERIC Determines whether an expression is a valid numeric type.
KILL Terminates a user process based on the system process ID (SPID) or unit of work (UOW). If the specified SPID or UOW has a lot of work to undo, the KILL command may take some time to complete, particularly when it involves rolling back a long transaction.
LEFT Returns the left part of a character string with the specified number of characters.
LEN Returns the number of characters, rather than the number of bytes, of the given string expression, excluding trailing blanks.
LIKE Determines whether or not a given character string matches a specified pattern. A pattern can include regular characters and wildcard characters. During pattern matching, regular characters must exactly match the characters specified in the character string. Wildcard characters, however, can be matched with arbitrary fragments of the character string. Using wildcard characters makes the LIKE operator more flexible than using the = and != string comparison operators. If any of the arguments are not of character string data type, Microsoft® SQL Server™ converts them to character string data type, if possible.
LOAD
LOG Returns the natural logarithm of the given float expression.
LOG10 Returns the base-10 logarithm of the given float expression.
LOWER Returns a character expression after converting uppercase character data to lowercase.
LTRIM Returns a character expression after removing leading blanks.
MAX Returns the maximum value in the expression.
MIN Returns the minimum value in the expression.
money and smallmoney Monetary data types for representing monetary or currency values.
MONTH Returns an integer that represents the month part of a specified date.
NCHAR Returns the Unicode character with the given integer code, as defined by the Unicode standard.
nchar and nvarchar Character data types that are either fixed-length (nchar) or variable-length (nvarchar) Unicode data and use the UNICODE UCS-2 character set.
NEWID Creates a unique value of type uniqueidentifier.
Northwind Sample Database The Northwind Traders sample database contains the sales data for a fictitious company called Northwind Traders, which imports and exports specialty foods from around the world.
NOT Negates a Boolean input.
ntext, text, and image Fixed and variable-length data types for storing large non-Unicode and Unicode character and binary data. Unicode data uses the UNICODE UCS-2 character set.
NULLIF Returns a null value if the two specified expressions are equivalent.
numeric For more information about the numeric data type, see decimal and numeric.
OBJECT_ID Returns the database object identification number.
OBJECT_NAME Returns the database object name.
OBJECTPROPERTY Returns information about objects in the current database.
OPEN Opens a Transact-SQL server cursor and populates the cursor by executing the Transact-SQL statement specified on the DECLARE CURSOR or SET cursor_variable statement.
OPENDATASOURCE Provides ad hoc connection information as part of a four-part object name without using a linked server name.
OPENQUERY Executes the specified pass-through query on the given linked server, which is an OLE DB data source. The OPENQUERY function can be referenced in the FROM clause of a query as though it is a table name. The OPENQUERY function can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement, subject to the capabilities of the OLE DB provider. Although the query may return multiple result sets, OPENQUERY returns only the first one.
OPENROWSET Includes all connection information necessary to access remote data from an OLE DB data source. This method is an alternative to accessing tables in a linked server and is a one-time, ad hoc method of connecting and accessing remote data using OLE DB. The OPENROWSET function can be referenced in the FROM clause of a query as though it is a table name. The OPENROWSET function can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement, subject to the capabilities of the OLE DB provider. Although the query may return multiple result sets, OPENROWSET returns only the first one.
OPENXML OPENXML provides a rowset view over an XML document. Because OPENXML is a rowset provider, OPENXML can be used in Transact-SQL statements in which rowset providers such as a table, view, or the OPENROWSET function can appear.
Operators
OR Combines two conditions. When more than one logical operator is used in a statement, OR operators are evaluated after AND operators. However, you can change the order of evaluation by using parentheses.
ORDER BY Specifies the sort order used on columns returned in a SELECT statement. For more information, see SELECT.
PARSENAME Returns the specified part of an object name. Parts of an object that can be retrieved are the object name, owner name, database name, and server name.
PATINDEX Returns the starting position of the first occurrence of a pattern in a specified expression, or zeros if the pattern is not found, on all valid text and character data types.
PERMISSIONS Returns a value containing a bitmap that indicates the statement, object, or column permissions for the current user.
PI Returns the constant value of PI.
POWER Returns the value of the given expression to the specified power.
Predicate Is an expression that evaluates to TRUE, FALSE, or UNKNOWN. Predicates are used in the search condition of WHERE clauses and HAVING clauses, and the join conditions of FROM clauses.
PRINT Returns a user-defined message to the client.
pubs Sample Database The pubs sample database is modeled after a book publishing company and is used to demonstrate many of the options available for a Microsoft® SQL Server™ database. The database and its tables are commonly used in the examples presented in the documentation content.
QUOTENAME Returns a Unicode string with the delimiters added to make the input string a valid Microsoft® SQL Server™ delimited identifier.
RADIANS Returns radians when a numeric expression, in degrees, is entered.
RAISERROR Returns a user-defined error message and sets a system flag to record that an error has occurred. Using RAISERROR, the client can either retrieve an entry from the sysmessages table or build a message dynamically with user-specified severity and state information. After the message is defined it is sent back to the client as a server error message.
RAND Returns a random float value from 0 through 1.
READTEXT Reads text, ntext, or image values from a text, ntext, or image column, starting from a specified offset and reading the specified number of bytes.
real For more information about the real data type, see float and real.
RECONFIGURE Updates the currently configured (the config_value column in the sp_configure result set) value of a configuration option changed with the sp_configure system stored procedure. Because some configuration options require a server stop and restart to update the currently running value, RECONFIGURE does not always update the currently running value (the run_value column in the sp_configure result set) for a changed configuration value.
REPLACE Replaces all occurrences of the second given string expression in the first string expression with a third expression.
REPLICATE Repeats a character expression for a specified number of times.
Reserved Keywords Microsoft® SQL Server™ 2000 uses reserved keywords for defining, manipulating, and accessing databases. Reserved keywords are part of the grammar of the Transact-SQL language used by SQL Server to parse and understand Transact-SQL statements and batches. Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, this can be done only using delimited identifiers.
RESTORE Restores backups taken using the BACKUP command. For more information about database back up and restore operations, see Backing Up and Restoring Databases.
RESTORE FILELISTONLY Returns a result set with a list of the database and log files contained in the backup set.
RESTORE HEADERONLY Retrieves all the backup header information for all backup sets on a particular backup device. The result from executing RESTORE HEADERONLY is a result set.
RESTORE LABELONLY Returns a result set containing information about the backup media identified by the given backup device.
RESTORE VERIFYONLY Verifies the backup but does not restore the backup. Checks to see that the backup set is complete and that all volumes are readable. However, RESTORE VERIFYONLY does not attempt to verify the structure of the data contained in the backup volumes. If the backup is valid, Microsoft® SQL Server™ 2000 returns the message: "The backup set is valid."
RETURN Exits unconditionally from a query or procedure. RETURN is immediate and complete and can be used at any point to exit from a procedure, batch, or statement block. Statements following RETURN are not executed.
REVERSE Returns the reverse of a character expression.
REVOKE Removes a previously granted or denied permission from a user in the current database.
RIGHT Returns the right part of a character string with the specified number of characters. 
ROLLBACK TRANSACTION Rolls back an explicit or implicit transaction to the beginning of the transaction, or to a savepoint inside a transaction.
ROLLBACK WORK Rolls back a user-specified transaction to the beginning of a transaction.
ROUND Returns a numeric expression, rounded to the specified length or precision.
ROWCOUNT_BIG Returns the number of rows affected by the last statement executed. This function operates like @@ROWCOUNT, except that the return type of ROWCOUNT_BIG is bigint.
RTRIM Returns a character string after truncating all trailing blanks.
SAVE TRANSACTION Sets a savepoint within a transaction.
SCOPE_IDENTITY Returns the last IDENTITY value inserted into an IDENTITY column in the same scope. A scope is a module -- a stored procedure, trigger, function, or batch. Thus, two statements are in the same scope if they are in the same stored procedure, function, or batch.
Search Condition Is a combination of one or more predicates using the logical operators AND, OR, and NOT.
SELECT @local_variable Specifies that the given local variable (created using DECLARE @local_variable) should be set to the specified expression.
SELECT Retrieves rows from the database and allows the selection of one or many rows or columns from one or many tables. The full syntax of the SELECT statement is complex, but the main clauses can be summarized as:
SERVERPROPERTY Returns property information about the server instance.
SESSION_USER Is a niladic function that allows a system-supplied value for the current session's username to be inserted into a table when no default value is specified. Also allows the username to be used in queries, error messages, and so on.
SESSIONPROPERTY Returns the SET options settings of a session.
SET @local_variable Sets the specified local variable, previously created with the DECLARE @local_variable statement, to the given value.
SET The Transact-SQL programming language provides several SET statements that alter the current session handling of specific information.
SETUSER Allows a member of the sysadmin fixed server role to impersonate another user.
SHUTDOWN Immediately stops Microsoft® SQL Server™.
SIGN Returns the positive (+1), zero (0), or negative (-1) sign of the given expression.
SIN Returns the trigonometric sine of the given angle (in radians) in an approximate numeric (float) expression.
smalldatetime For information about the smalldatetime data type, see datetime and smalldatetime.
smallint For information about the smallint data type, see int, bigint, smallint, and tinyint.
smallmoney For information about the smallmoney data type, see money and smallmoney.
SOME | ANY Compares a scalar value with a single-column set of values.
SOUNDEX Returns a four-character (SOUNDEX) code to evaluate the similarity of two strings.
SPACE Returns a string of repeated spaces.
sql_variant A data type that stores values of various SQL Server-supported data types, except text, ntext, image, timestamp, and sql_variant.
SQL_VARIANT_PROPERTY Returns the base data type and other information about a sql_variant value.
SQUARE Returns the square of the given expression.
SQRT Returns the square root of the given expression.
STATS_DATE Returns the date that the statistics for the specified index were last updated.
STDEV Returns the statistical standard deviation of all values in the given expression.
STDEVP Returns the statistical standard deviation for the population for all values in the given expression.
STR Returns character data converted from numeric data.
STUFF Deletes a specified length of characters and inserts another set of characters at a specified starting point.
SUBSTRING Returns part of a character, binary, text, or image expression. For more information about the valid Microsoft® SQL Server™ data types that can be used with this function, see Data Types.
SUM Returns the sum of all the values, or only the DISTINCT values, in the expression. SUM can be used with numeric columns only. Null values are ignored.
SUSER_ID Returns the user's login identification number.
SUSER_NAME Returns the user's login identification name.
SUSER_SID Returns the security identification number (SID) for the user's login name.
SUSER_SNAME Returns the login identification name from a user's security identification number (SID).
System Stored Procedures Many administrative and informational activities in Microsoft® SQL Server™ can be performed through system stored procedures. The system stored procedures are grouped into these categories.
System Tables The information used by Microsoft® SQL Server™ 2000 and its components is stored in special tables known as system tables.
SYSTEM_USER Allows a system-supplied value for the current system username to be inserted into a table when no default value is specified.
table A special data type that can be used to store a result set for later processing. Its primary use is for temporary storage of a set of rows, which are to be returned as the result set of a table-valued function.
TAN Returns the tangent of the input expression.
text For information about the text data type, see ntext, text, and image.
TEXTPTR Returns the text-pointer value that corresponds to a text, ntext, or image column in varbinary format. The retrieved text pointer value can be used in READTEXT, WRITETEXT, and UPDATETEXT statements.
TEXTVALID A text, ntext, or image function that checks whether a given text pointer is valid.
timestamp timestamp is a  data type that exposes automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes.
tinyint For information about the tinyint data type, see int, bigint, smallint, and tinyint.
Trace Flags Trace flags are used to temporarily set specific server characteristics or to switch off a particular behavior. For example, if trace flag 3205 is set when Microsoft® SQL Server™ starts, hardware compression for tape drivers is disabled. Trace flags are often used to diagnose performance issues or to debug stored procedures or complex computer systems.
Transactions A transaction is a single unit of work. If a transaction is successful, all of the data modifications made during the transaction are committed and become a permanent part of the database. If a transaction encounters errors and must be canceled or rolled back, then all of the data modifications are erased.
TRIGGER_NESTLEVEL Returns the number of triggers executed for the UPDATE, INSERT, or DELETE statement that fired the trigger. TRIGGER_NESTLEVEL is used in triggers to determine the current level of nesting.
TRUNCATE TABLE Removes all rows from a table without logging the individual row deletes.
TYPEPROPERTY Returns information about a data type.
UNICODE Returns the integer value, as defined by the Unicode standard, for the first character of the input expression.
UNION Combines the results of two or more queries into a single result set consisting of all the rows belonging to all queries in the union. For more information, see SELECT.
uniqueidentifier A globally unique identifier (GUID).
UPDATE Changes existing data in a table.
UPDATE STATISTICS Updates information about the distribution of key values for one or more statistics groups (collections) in the specified table or indexed view. To create statistics on columns, see CREATE STATISTICS.
UPDATETEXT Updates an existing text, ntext, or image field. Use UPDATETEXT to change only a portion of a text, ntext, or image column in place. Use WRITETEXT to update and replace an entire text, ntext, or image field.
UPPER Returns a character expression with lowercase character data converted to uppercase.
USE Changes the database context to the specified database.
USER Allows a system-supplied value for the current user's database username to be inserted into a table when no default value is specified.
USER_ID Returns a user's database identification number.
USER_NAME Returns a user database username from a given identification number.
VAR Returns the statistical variance of all values in the given expression.
varbinary For information about the varbinary data type, see binary and varbinary.
varchar For information about the varchar data type, see char and varchar.
VARP Returns the statistical variance for the population for all values in the given expression.
WAITFOR Specifies a time, time interval, or event that triggers the execution of a statement block, stored procedure, or transaction.
WHERE Specifies the condition for the rows returned by a query.
WHILE Sets a condition for the repeated execution of an SQL statement or statement block. The statements are executed repeatedly as long as the specified condition is true. The execution of statements in the WHILE loop can be controlled from inside the loop with the BREAK and CONTINUE keywords.
WRITETEXT Permits nonlogged, interactive updating of an existing text, ntext, or image column. This statement completely overwrites any existing data in the column it affects. WRITETEXT cannot be used on text, ntext, and image columns in views.
YEAR Returns an integer that represents the year part of a specified date.