SlideShare a Scribd company logo
EXCITING FEATURES FOR
SQL DEVS IN SQL 2012
Brij Bhushan Mishra
About Me
• Brij Bhushan Mishra
• Microsoft ASP.NET/IIS MVP
• Former CodeProject MVP
• Blogger/Author/Speaker
• http://brijbhushan.net
• @brij_bhushan
• brij.mishra@outlook.com
SQL-2012 Enticing features
• Contained database
• Always On
• Column Store Indexes
• Visual Studio integration with Management Studio
• TSQL Enhancements
Row Store
• Relational Data is stored as row wise which further gets
stored in page with page size 8KB in HardDisk as
Row Store
Column 1 Column 2 Column 3 Column 4 Column 5 Column 1 Column 2 Column 3 Column 4 Column 5
Page 1 Page 2
Column 1
Hits multiple rows to fetch the data
Columnstore index
• Pages stores column data and Columns are heavily
compressed
Column 1 Column 1 Column 4 Column 4
Page 2Page 1
• Removes redundancy and provide faster search
Limitations
• 1 Table can have only one 1 Columnstore index
• After creating Columnstore index table cannot be updated
TSQL Enhancement
• Sequence Objects
• Data Paging
• Error handling
• Exec Procs with Result Set
• Metadata discovery
• Logical functions and String Functions
• Conversion functions
• Date Time functions
• Analytic Functions LEAD() and LAG()
Sequence Objects
• A user defined object that returns a sequence of numeric
values
• Similar is available with Oracle
• Unique to database, not to a Table (Not like Identity
Column)
• Can be used anywhere not specific to a Table
• Does not support Transaction
Parameters
Type (Integer) MAXVALUE
START WITH <constant> CYCLE | NO CYCLE
INCREMENT BY <constant> CACHE <constant> | NO CACHE
MINVALUE
DEMO
Data Paging
• One of the most used features in Applications
• Most of the application implements Paging at Application
level (not a database level)
• Currently for Database level Paging
• Retrieve data using ROW_NUMBER function
• Temp Tables
• Other options..
• SQL 2012 simplified this
• Need to set the offset command
• The number of Rows that required to be fetched by using “FETCH”
command
DEMO
Error handling
• SQL Server 2005 introduced try/catch (But throw was
missing)
• But to send the error to client, required to use
RAISEERROR
• Throw is added (similar like C# or vb.NET)
• Now do not required to add a entry in Sys.Messages table
• The original exception is sent to the Client.
DEMO
EXEC Stored Proc with Result Sets
• Can specify a new option with the EXECUTE statement
as
EXECUTE <proc> WITH <result_set_option>
• Allows to change the column names and data types in
Result Sets
DEMO
Metadata Discovery
• Earlier we used SET FMTONLY ON that is used to return
the metadata only (Not the actual data)
• Very helpful, in scenarios where we cannot predict the
result set.
• Two new Proc and equivalent DMV introduced
• sp_describe_first_result_set
• sp_describe_undeclared_parameters
• sys.dm_exec_describe_first_result_set
• sys.dm_exec_describe_first_result_set_for_object
DEMO
Logical and String Functions
• IIF
• Takes a boolean expression and returns one of the two given values.
• Shorthand of Case expression
• Can be nested upto 10 levels
• CHOOSE
• Returns a value from the list based on the provided Index
• If does not find then returns null
• DataType is returned based on the precedence
• FORMAT
• FORMAT function for locale-aware formatting of date/time and
number values as strings
• CONCAT
• Concatenates two or more strings
Conversion Functions
• PARSE
• Parse a string and try to convert in provided data type.
• Uses the .NET CLR
• Raise an error if not able to convert it
• TRY_PARSE
• Similar to parse but returns null if unable to parse
• Also uses the .NET CLR
• TRY_CONVERT
• Similar to Convert but returns null if unable to parse
DEMO
DateTime functions
• EOMONTH (start_date)
• DATEFROMPARTS (year, month, day)
• DATETIME2FROMPARTS (year, month, day, hour,
minute, seconds, fractions, precision)
• DATETIMEFROMPARTS (year, month, day, hour, minute,
seconds, milliseconds)
• DATETIMEOFFSETFROMPARTS (year, month, day,
hour, minute, seconds, fractions, hour_offset,
minute_offset, precision)
• SMALLDATETIMEFROMPARTS (year, month, day, hour,
minute)
• TIMEFROMPARTS (hour, minute, seconds, fractions,
precision)
Analytic function Lead() and Lag()
• LAG() – Access the data in the previous row from the
same result set without self join
• Parameters
• scalar_expression
• Offset
• Default
• Over([partition_by_clause] order_by_clause) *
• Lead() - Access the data in the subsequent row from the
same result se
• scalar_expression
• Offset
• Default
• Over([partition_by_clause] order_by_clause) *.
Thank you
• http://brijbhushan.net
• @brij_bhushan
• brij.mishra@outlook.com

More Related Content

What's hot

Distributed Model Validation with Epsilon
Distributed Model Validation with EpsilonDistributed Model Validation with Epsilon
Distributed Model Validation with Epsilon
Sina Madani
 
Grokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way bindingGrokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way binding
Grokking VN
 
Sitecore Data Exchange Framework
Sitecore Data Exchange FrameworkSitecore Data Exchange Framework
Sitecore Data Exchange Framework
Radek Kozłowski
 
SFDC Batch Apex
SFDC Batch ApexSFDC Batch Apex
SFDC Batch Apex
Sujit Kumar
 
Sql plsql online training
Sql plsql online trainingSql plsql online training
Sql plsql online training
enrollmy training
 
Entity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x AdvancedEntity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x Advanced
Christian Nagel
 
Soap UI - Lesson2
Soap UI - Lesson2Soap UI - Lesson2
Soap UI - Lesson2
Qualitest
 
Understanding LINQ in C#
Understanding LINQ in C# Understanding LINQ in C#
Understanding LINQ in C#
MD. Shohag Mia
 
Mysql Indexing
Mysql IndexingMysql Indexing
Mysql Indexing
Tasawr Interactive
 
XML Data Types in the Real World
XML Data Types in the Real WorldXML Data Types in the Real World
XML Data Types in the Real World
Steve Hughes
 
MySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesMySQL Performance Tips & Best Practices
MySQL Performance Tips & Best Practices
Isaac Mosquera
 
Windowing functions session for Slovak SQL Pass & BI
Windowing functions session for Slovak SQL Pass & BIWindowing functions session for Slovak SQL Pass & BI
Windowing functions session for Slovak SQL Pass & BI
Andrej Zafka
 
Soap UI - Lesson3
Soap UI - Lesson3Soap UI - Lesson3
Soap UI - Lesson3
Qualitest
 
Soap UI - Getting started
Soap UI - Getting startedSoap UI - Getting started
Soap UI - Getting started
Qualitest
 
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...Saurabh Patel
 
High Performance SSRS
High Performance SSRSHigh Performance SSRS
High Performance SSRS
Bert Wagner
 
C# 8 in Libraries and Applications
C# 8 in Libraries and ApplicationsC# 8 in Libraries and Applications
C# 8 in Libraries and Applications
Christian Nagel
 
SQL Pass Summit Presentations from Datavail - Optimize SQL Server: Query Tuni...
SQL Pass Summit Presentations from Datavail - Optimize SQL Server: Query Tuni...SQL Pass Summit Presentations from Datavail - Optimize SQL Server: Query Tuni...
SQL Pass Summit Presentations from Datavail - Optimize SQL Server: Query Tuni...
Datavail
 
DBAs vs Developers - JSON in SQL Server
DBAs vs Developers - JSON in SQL ServerDBAs vs Developers - JSON in SQL Server
DBAs vs Developers - JSON in SQL Server
Bert Wagner
 
Breaking data
Breaking dataBreaking data
Breaking data
Terry Bunio
 

What's hot (20)

Distributed Model Validation with Epsilon
Distributed Model Validation with EpsilonDistributed Model Validation with Epsilon
Distributed Model Validation with Epsilon
 
Grokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way bindingGrokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way binding
 
Sitecore Data Exchange Framework
Sitecore Data Exchange FrameworkSitecore Data Exchange Framework
Sitecore Data Exchange Framework
 
SFDC Batch Apex
SFDC Batch ApexSFDC Batch Apex
SFDC Batch Apex
 
Sql plsql online training
Sql plsql online trainingSql plsql online training
Sql plsql online training
 
Entity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x AdvancedEntity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x Advanced
 
Soap UI - Lesson2
Soap UI - Lesson2Soap UI - Lesson2
Soap UI - Lesson2
 
Understanding LINQ in C#
Understanding LINQ in C# Understanding LINQ in C#
Understanding LINQ in C#
 
Mysql Indexing
Mysql IndexingMysql Indexing
Mysql Indexing
 
XML Data Types in the Real World
XML Data Types in the Real WorldXML Data Types in the Real World
XML Data Types in the Real World
 
MySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesMySQL Performance Tips & Best Practices
MySQL Performance Tips & Best Practices
 
Windowing functions session for Slovak SQL Pass & BI
Windowing functions session for Slovak SQL Pass & BIWindowing functions session for Slovak SQL Pass & BI
Windowing functions session for Slovak SQL Pass & BI
 
Soap UI - Lesson3
Soap UI - Lesson3Soap UI - Lesson3
Soap UI - Lesson3
 
Soap UI - Getting started
Soap UI - Getting startedSoap UI - Getting started
Soap UI - Getting started
 
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
 
High Performance SSRS
High Performance SSRSHigh Performance SSRS
High Performance SSRS
 
C# 8 in Libraries and Applications
C# 8 in Libraries and ApplicationsC# 8 in Libraries and Applications
C# 8 in Libraries and Applications
 
SQL Pass Summit Presentations from Datavail - Optimize SQL Server: Query Tuni...
SQL Pass Summit Presentations from Datavail - Optimize SQL Server: Query Tuni...SQL Pass Summit Presentations from Datavail - Optimize SQL Server: Query Tuni...
SQL Pass Summit Presentations from Datavail - Optimize SQL Server: Query Tuni...
 
DBAs vs Developers - JSON in SQL Server
DBAs vs Developers - JSON in SQL ServerDBAs vs Developers - JSON in SQL Server
DBAs vs Developers - JSON in SQL Server
 
Breaking data
Breaking dataBreaking data
Breaking data
 

Viewers also liked

Encuesta Corbiobío Agosto
Encuesta Corbiobío AgostoEncuesta Corbiobío Agosto
Encuesta Corbiobío Agostomivoz
 
226 244
226 244226 244
226 244
atti_mac
 

Viewers also liked (8)

1 20
1 201 20
1 20
 
Presentation3
Presentation3Presentation3
Presentation3
 
Encuesta Corbiobío Agosto
Encuesta Corbiobío AgostoEncuesta Corbiobío Agosto
Encuesta Corbiobío Agosto
 
21 40
21 4021 40
21 40
 
126 150
126 150126 150
126 150
 
176 200
176 200176 200
176 200
 
201 225
201 225201 225
201 225
 
226 244
226 244226 244
226 244
 

Similar to Exciting Features for SQL Devs in SQL 2012

New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012 New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012
Richie Rump
 
SQL Server 2008 For Developers
SQL Server 2008 For DevelopersSQL Server 2008 For Developers
SQL Server 2008 For Developers
John Sterrett
 
Querying_with_T-SQL_-_01.pptx
Querying_with_T-SQL_-_01.pptxQuerying_with_T-SQL_-_01.pptx
Querying_with_T-SQL_-_01.pptx
QuyVo27
 
Exploring T-SQL Anti-Patterns
Exploring T-SQL Anti-Patterns Exploring T-SQL Anti-Patterns
Exploring T-SQL Anti-Patterns
Antonios Chatzipavlis
 
MWLUG 2016 : AD117 : Xpages & jQuery DataTables
MWLUG 2016 : AD117 : Xpages & jQuery DataTablesMWLUG 2016 : AD117 : Xpages & jQuery DataTables
MWLUG 2016 : AD117 : Xpages & jQuery DataTables
Michael Smith
 
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
Nancy Thomas
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
What's new in SQL Server Integration Services 2012?
What's new in SQL Server Integration Services 2012?What's new in SQL Server Integration Services 2012?
What's new in SQL Server Integration Services 2012?
Microsoft TechNet - Belgium and Luxembourg
 
3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql
Łukasz Grala
 
Dan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New FeaturesDan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New Features
Embarcadero Technologies
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
Michael Keane
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
Kevin Kline
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
Kellyn Pot'Vin-Gorman
 
Oracle 12c New Features for Developers
Oracle 12c New Features for DevelopersOracle 12c New Features for Developers
Oracle 12c New Features for Developers
CompleteITProfessional
 
Improve power bi performance
Improve power bi performanceImprove power bi performance
Improve power bi performance
Annie Xu
 
Bringing DevOps to the Database
Bringing DevOps to the DatabaseBringing DevOps to the Database
Bringing DevOps to the Database
Michaela Murray
 
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibabahbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
Michael Stack
 
BITM3730Week14.pptx
BITM3730Week14.pptxBITM3730Week14.pptx
BITM3730Week14.pptx
MattMarino13
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
Ashnikbiz
 

Similar to Exciting Features for SQL Devs in SQL 2012 (20)

New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012 New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012
 
SQL Server 2008 For Developers
SQL Server 2008 For DevelopersSQL Server 2008 For Developers
SQL Server 2008 For Developers
 
Querying_with_T-SQL_-_01.pptx
Querying_with_T-SQL_-_01.pptxQuerying_with_T-SQL_-_01.pptx
Querying_with_T-SQL_-_01.pptx
 
Exploring T-SQL Anti-Patterns
Exploring T-SQL Anti-Patterns Exploring T-SQL Anti-Patterns
Exploring T-SQL Anti-Patterns
 
MWLUG 2016 : AD117 : Xpages & jQuery DataTables
MWLUG 2016 : AD117 : Xpages & jQuery DataTablesMWLUG 2016 : AD117 : Xpages & jQuery DataTables
MWLUG 2016 : AD117 : Xpages & jQuery DataTables
 
Sas keyword
Sas keywordSas keyword
Sas keyword
 
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
 
What's new in SQL Server Integration Services 2012?
What's new in SQL Server Integration Services 2012?What's new in SQL Server Integration Services 2012?
What's new in SQL Server Integration Services 2012?
 
3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql
 
Dan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New FeaturesDan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New Features
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
 
Oracle 12c New Features for Developers
Oracle 12c New Features for DevelopersOracle 12c New Features for Developers
Oracle 12c New Features for Developers
 
Improve power bi performance
Improve power bi performanceImprove power bi performance
Improve power bi performance
 
Bringing DevOps to the Database
Bringing DevOps to the DatabaseBringing DevOps to the Database
Bringing DevOps to the Database
 
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibabahbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
 
BITM3730Week14.pptx
BITM3730Week14.pptxBITM3730Week14.pptx
BITM3730Week14.pptx
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

Exciting Features for SQL Devs in SQL 2012

  • 1. EXCITING FEATURES FOR SQL DEVS IN SQL 2012 Brij Bhushan Mishra
  • 2. About Me • Brij Bhushan Mishra • Microsoft ASP.NET/IIS MVP • Former CodeProject MVP • Blogger/Author/Speaker • http://brijbhushan.net • @brij_bhushan • brij.mishra@outlook.com
  • 3. SQL-2012 Enticing features • Contained database • Always On • Column Store Indexes • Visual Studio integration with Management Studio • TSQL Enhancements
  • 4. Row Store • Relational Data is stored as row wise which further gets stored in page with page size 8KB in HardDisk as Row Store Column 1 Column 2 Column 3 Column 4 Column 5 Column 1 Column 2 Column 3 Column 4 Column 5 Page 1 Page 2 Column 1 Hits multiple rows to fetch the data
  • 5. Columnstore index • Pages stores column data and Columns are heavily compressed Column 1 Column 1 Column 4 Column 4 Page 2Page 1 • Removes redundancy and provide faster search Limitations • 1 Table can have only one 1 Columnstore index • After creating Columnstore index table cannot be updated
  • 6. TSQL Enhancement • Sequence Objects • Data Paging • Error handling • Exec Procs with Result Set • Metadata discovery • Logical functions and String Functions • Conversion functions • Date Time functions • Analytic Functions LEAD() and LAG()
  • 7. Sequence Objects • A user defined object that returns a sequence of numeric values • Similar is available with Oracle • Unique to database, not to a Table (Not like Identity Column) • Can be used anywhere not specific to a Table • Does not support Transaction Parameters Type (Integer) MAXVALUE START WITH <constant> CYCLE | NO CYCLE INCREMENT BY <constant> CACHE <constant> | NO CACHE MINVALUE DEMO
  • 8. Data Paging • One of the most used features in Applications • Most of the application implements Paging at Application level (not a database level) • Currently for Database level Paging • Retrieve data using ROW_NUMBER function • Temp Tables • Other options.. • SQL 2012 simplified this • Need to set the offset command • The number of Rows that required to be fetched by using “FETCH” command DEMO
  • 9. Error handling • SQL Server 2005 introduced try/catch (But throw was missing) • But to send the error to client, required to use RAISEERROR • Throw is added (similar like C# or vb.NET) • Now do not required to add a entry in Sys.Messages table • The original exception is sent to the Client. DEMO
  • 10. EXEC Stored Proc with Result Sets • Can specify a new option with the EXECUTE statement as EXECUTE <proc> WITH <result_set_option> • Allows to change the column names and data types in Result Sets DEMO
  • 11. Metadata Discovery • Earlier we used SET FMTONLY ON that is used to return the metadata only (Not the actual data) • Very helpful, in scenarios where we cannot predict the result set. • Two new Proc and equivalent DMV introduced • sp_describe_first_result_set • sp_describe_undeclared_parameters • sys.dm_exec_describe_first_result_set • sys.dm_exec_describe_first_result_set_for_object DEMO
  • 12. Logical and String Functions • IIF • Takes a boolean expression and returns one of the two given values. • Shorthand of Case expression • Can be nested upto 10 levels • CHOOSE • Returns a value from the list based on the provided Index • If does not find then returns null • DataType is returned based on the precedence • FORMAT • FORMAT function for locale-aware formatting of date/time and number values as strings • CONCAT • Concatenates two or more strings
  • 13. Conversion Functions • PARSE • Parse a string and try to convert in provided data type. • Uses the .NET CLR • Raise an error if not able to convert it • TRY_PARSE • Similar to parse but returns null if unable to parse • Also uses the .NET CLR • TRY_CONVERT • Similar to Convert but returns null if unable to parse DEMO
  • 14. DateTime functions • EOMONTH (start_date) • DATEFROMPARTS (year, month, day) • DATETIME2FROMPARTS (year, month, day, hour, minute, seconds, fractions, precision) • DATETIMEFROMPARTS (year, month, day, hour, minute, seconds, milliseconds) • DATETIMEOFFSETFROMPARTS (year, month, day, hour, minute, seconds, fractions, hour_offset, minute_offset, precision) • SMALLDATETIMEFROMPARTS (year, month, day, hour, minute) • TIMEFROMPARTS (hour, minute, seconds, fractions, precision)
  • 15. Analytic function Lead() and Lag() • LAG() – Access the data in the previous row from the same result set without self join • Parameters • scalar_expression • Offset • Default • Over([partition_by_clause] order_by_clause) * • Lead() - Access the data in the subsequent row from the same result se • scalar_expression • Offset • Default • Over([partition_by_clause] order_by_clause) *.
  • 16. Thank you • http://brijbhushan.net • @brij_bhushan • brij.mishra@outlook.com