Академический Документы
Профессиональный Документы
Культура Документы
About Me
Microsoft MVP (SQL) Author/coauthor of several books:
Pro T-SQL 2008 Programmers Guide Pro SQL Server 2008 XML Expert SQL Server 2008 Encryption (October 2009) Pro Full-Text Search in SQL Server 2008 Accelerated SQL Server 2008
INTRODUCTION
INTRODUCTION
Developer Improvements
Productivity
Delighters Row Constructors SSMS Intellisense/Collapsible Code Blocks
INTRODUCTION
Language
Data Types
XML/XQuery
Delighters
Inline variable assignment
PRODUCTIVITY ENHANCEMENTS
Row Constructors
Specify multiple sets of attributes in clause:
PRODUCTIVITY ENHANCEMENTS
SSMS Intellisense
SQL Server Management Studio (SSMS) Intellisense
PRODUCTIVITY ENHANCEMENTS
PRODUCTIVITY ENHANCEMENTS
MERGE Statement
The statement combines conditional , and functionality in a single statement
Specify target, source, match criteria and matched/not matched action You can combine match criteria and actions to form complex merges
LANGUAGE ENHANCEMENTS
LANGUAGE ENHANCEMENTS
LANGUAGE ENHANCEMENTS
Composable DML
You can use the clause to feed input to another SQL DML statement General format:
LANGUAGE ENHANCEMENTS
LANGUAGE ENHANCEMENTS
LANGUAGE ENHANCEMENTS
Declaring TVPs
Create a user-defined table type:
LANGUAGE ENHANCEMENTS
Using TVPs
Create procedure table type parameter:
LANGUAGE ENHANCEMENTS
TVP Tips
Internally table-valued parameters are treated like table variables
Well-defined scope/current batch Not affected by transaction rollback (beyond the atomic statement scope) No histograms or distribution statistics
LANGUAGE ENHANCEMENTS
Grouping Sets
New ISO-compliant subclause of allows custom aggregations Similar to and but much more flexible s are used as placeholders in result set
LANGUAGE ENHANCEMENTS
LANGUAGE ENHANCEMENTS
Max
Dec. 31, 9999 C.E. 12:59:59.997 Jun. 6, 2079 23:59:00
Storage
8 bytes
4 bytes
3 bytes 3 5 bytes (variable fractional seconds) 6 8 bytes (variable fractional seconds) 8 10 bytes (variable fractional seconds)
Dec. 31, 9999 C.E. 23:59:59.9999999 Dec. 31, 9999 C.E. 23:59:59.9999999
Built-in support for Geography Markup Language (GML), Well-Known Text (WKT) and Well-Known Binary (WKB) formats Supports indexing spatial data for efficient spatial calculations
Spatial Models
model model
XML/XQuery
XQuery FLWOR ( ) expressions now support clause Supports XQuery/XDM , data types Does not require time offset in date/time values (default is UTCZ or +00:00) Date/time values not normalized to UTC; stored with time offset information specified XML DML now supports SQL Server variables in statements
XML/XQUERY ENHANCEMENTS
More Features
Sparse Columns/XML Column Sets Filtered Indexes Large SQL CLR User-Defined Types/Aggregates Wide Tables Row compression Page compression
MORE FEATURES
Questions
THE END
References
Microsoft. SQL Server 2008 Books Online. http://msdn.microsoft.com. Coles, M. Pro T-SQL Programmers Guide, Apress.
THE END