Required Slide. SESSION CODE: DAT405. Transact-SQL Tips and Tricks. Itzik Ben-Gan Mentor and Co-Founder Solid Quality Mentors. Tobias Ternstrom Senior Program Manager Lead SQL Server Engine. Agenda. 75 mins Intro 5 minutes Warm-up, a couple of Tips to get started! 15 minutes
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
L0 AS(SELECT 1 AS c UNIONALLSELECT 1),
L1 AS(SELECT 1 AS c FROM L0 AS A CROSSJOIN L0 AS B),
L2 AS(SELECT 1 AS c FROM L1 AS A CROSSJOIN L1 AS B),
L3 AS(SELECT 1 AS c FROM L2 AS A CROSSJOIN L2 AS B),
L4 AS(SELECT 1 AS c FROM L3 AS A CROSSJOIN L3 AS B),
L5 AS(SELECT 1 AS c FROM L4 AS A CROSSJOIN L4 AS B),
SELECTTOP (@n) n FROMNumsORDERBY n;
WITH Dates AS
SELECTDATEADD(day, n-1, @from)ASdt
FROMdbo.GetNums(DATEDIFF(DAY, @from, @to)+ 1)ASNums
JOIN Dates AS D
“Dormant result sets consume threads and memory”
“The stability of result sets vary”
Example:(using default isolation level)
CREATE TABLE TestStability (RowNo INT NOT NULL PRIMARY KEY, Value INT NOT NULL);
Track PMs will supply the content for this slide, which will be inserted during the final scrub.DAT Track Scratch 2 Win
Complete an evaluation on CommNet and enter to win!
You can also register at the North America 2011 kiosk located at registrationJoin us in Atlanta next year
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.