Important Commands and Functions(Sql Server 2005)
Important Commands and Functions
- AND
-
Logical operator that, when used in a WHEREclause, means that both criteria have to be met for a row to be included in the result set.
- BETWEEN
-
An operator used to determine whether a value occurs within a given range of values (inclusive); used with a WHERE clause.
- CONSTRAINTS
-
Restrictions that can be placed on values when creating database objects such as tables and views.
- COUNT(attribute)
-
Group function that counts the number of rows where attribute is not NULL.
- DATEFORMAT
-
Date function that controls how SQL Server interprets date constants that are entered for dates.
- DATETIME
-
Data type that can be used for dates.
- DECIMAL
-
Numeric data type whose storage type varies based on a specified precision.
- EXISTS
-
A keyword in a SQL statement that returns true in a WHERE clause if the subquery following it returns at least one row.
- FLOOR
-
Row-level function which returns the next lower integer value when a number contains decimal places.
- GROUP BY
-
Produces one summary row for the aggregate value of all values for a given column.
- GUID
-
Global unique identifier; UNIQUEIDENTIFIER data type guarantees worldwide uniqueness, even among unconnected computers.
- HAVING
-
Part of a SQL statement that is used to determine which groups of a GROUP BY will be included in the result set.
- INSERT INTO..VALUES
-
A way to insert values into a table one row at a time.
- INSERT
-
Command that allows for the addition of new rows to a table.
- INTERSECT
-
Set operation that combines two queries such that it returns all rows that are the same in both result sets.
- ISNULL
-
Function that returns a true value if a data item contains a null.
- JOIN
-
Command used to join two tables; synonymous with INNER JOIN.
- LEFT OUTER JOIN
-
A join where all the rows from the first (left) table are kept in the result set, regardless of whether they have matching rows in the second (right) table.
- LIKE
-
A WHERE clause option that matches a particular pattern.
- MINUS
-
Set operation that returns only those rows from the result of the first query that are not in the result of the second query; not available in SQL Server.
- NCHAR
-
Fixed-length Unicode character data type.
- NOT
-
Operator that reverses the effect of any logical operator such as IN, LIKE, and EXISTS.
- NOT BETWEEN
-
Operator that allows you to determine whether a value does not occur within a given range of values.
- NOT EXISTS
-
Operator that returns true in a WHERE clause if the subquery following it returns no rows.
- NOT NULL Constraint
-
Integrity constraint that denies the creation of a row when an attribute has a null value.
- NULL
-
Value that is unknown.
- ORDER BY
-
Clause that sorts the results of a query before they are displayed.
- OUTER JOIN
-
Join where rows from a table are kept in the result set although there is no matching row in the other table used in the join.
- PERCENT
-
Function that is used to return a certain percentage of records that fall at the top of a range specified.
- PRIMARY KEY
-
Constraint used to create a primary key in a table; used in CREATE TABLE and ALTER TABLE commands.
- REAL
-
Decimal data type that has a precision of seven digits.
- REFERENCES
-
Constraint part that defines the table name and key used to reference another table.
- RIGHT OUTER JOIN
-
Join where all the rows from the second (right) relation are kept whether matched or not in a join operation.
- SQRT
-
Row-level function that returns the square root of positive numeric values.
- TABLE
-
A two-dimensional (row by column) arrangement of data.
- TEXT
-
Character large object data type.
- UNION
-
Set operation that combines two queries such that it returns all distinct rows for the result sets of both queries. The two queries must have union-compatible result sets.
- UNION ALL
-
Set operation that combines two queries and returns all rows from both the SELECT statements (queries). A UNION ALL also includes duplicate rows. The two queries must have union-compatible result sets.
- UNIQUE
-
Integrity constraint that disallows duplicate entries for an attribute even though the column is not a primary key.
- UNIQUEIDENTIFIER
-
Data type that guarantees uniqueness of the identifier, even among unconnected computers.
- UUID
-
Universal unique identifier; the UNIQUEIDENTIFIER data type that guarantees uniqueness, even among unconnected computers.
- WHERE
-
Row filter part of a SQL statement that allows you to specify criteria on column values for rows that are being selected from a table.
- WITH TIES
-
Clause used with the TOP function to retrieve rows that are ties.