What's new in SQL Server 2005 for the T-SQL programmer
I have been taking a course on SQL Server 2005 Transact-SQL and having already worked on SQL Server 7 & 2000, I was keen on knowing what new Transact-SQL features SQL Server 2005 offers. With help from other online resources as well, I have summarized the key enhancements for quick reference -
To be continued....
- TOP — Row count based on an expression. TOP can also be used with INSERT, UPDATE, and DELETE.
- OUTPUT clause with DML Commands - to determine the changes from an INSERT, UPDATE, or DELETE
- PIVOT/UNPIVOT - to create crosstab queries
- TRY-CATCH - for improved error handling
- Ranking Functions [ ROW_NUMBER(), RANK(), DENSE_RANK(), and NTILE() ] - ranking adds an extra value column to the resultset that is based on a ranking algorithm being applied to a column of the result.
- DDL Triggers - fire when CREATE, ALTER, or DROP statements are executed, useful for auditing
- Common Table Expression (CTE) - to create recursive query expressions
- TABLESAMPLE clause - lets you efficiently sample pages from a table.
- SNAPSHOT isolation level — Additional isolation level (not a ANSI Transaction Isolation Level) that does not use write locks
- Statement-level recompile — More efficient recompilation of stored procedures
- Event notifications — Integration of Data Definition Language (DDL) and DML operations with Service Broker
- Large data types— The MAX specifier that can be used with VARCHAR, NVARCHAR & VARBINARY allows storage of up to 2^31-1 bytes (2,147,483,647 bytes or 2GB - 1 bytes).These new data types deprecate TEXT, NTEXT & IMAGE data types (known as Large Object data types, or LOBs)
- APPLY operator — New JOIN syntax made for use with user-defined functions and XML
- EXCEPT & INTERSECT operators - EXCEPT returns any distinct values from the left query that are not also found on the right query while INTERSECT returns distinct rows that appear in both result sets.
- Dynamic Management Views [DMV] - returns server state information that can be used to monitor the server, check for problems, and to facilitate performance.
- Catalog Views - a completely new relational interface to the system catalog metadata.
- XML data type - for storing XML in the database.
- XQuery - a language that can query structured or semi-structured XML data.
To be continued....
Comments
Post a Comment