SlideShare una empresa de Scribd logo
1 de 12
Microsoft Sql Server

   SELECT Statement
Natural Order
• When you do a SELECT FROM the table, the
  rows will ALWAYS appear in the same order of
  insertion

• It’s the “natural” chronologically-entered
  order of the rows
Data Page
• Table data is stored as a collection of 8-KB
  (8192-byte) pages.

• 8060 bytes for the data on each page.

• A row of data can not span multiple pages.
Pages and Extents
• The fundamental unit of data storage in SQL
  Server is the page.
• Size of a page is 8 KB (96-byte header )
• Header store system information about the page:
• Page Number
• Page Type
• Free pace on the page
• Allocation unit ID
Data Page
Extents
• Page type: Data, Index, LOB,
  ROW_OVERFLOW_DATA etc.
• Extents are the basic unit in which space is
  managed.
• Extents are a collection of eight physically
  contiguous pages
JOINING OF TABLES

•   INNER JOIN
•   LEFT OUTER JOIN
•    RIGHT OUTER JOIN
•    FULL OUTER JOIN
INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
THANK YOU

Más contenido relacionado

La actualidad más candente

Intro to XML in libraries
Intro to XML in librariesIntro to XML in libraries
Intro to XML in librariesKyle Banerjee
 
SQL Server Columnstore
SQL Server ColumnstoreSQL Server Columnstore
SQL Server ColumnstoreTony Rogerson
 
Learn Data Structures With Myassignmenthelp.Net
Learn Data Structures With Myassignmenthelp.NetLearn Data Structures With Myassignmenthelp.Net
Learn Data Structures With Myassignmenthelp.NetSteve Johnson
 
Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014Antonios Chatzipavlis
 
Tk2323 lecture 7 sql
Tk2323 lecture 7   sql Tk2323 lecture 7   sql
Tk2323 lecture 7 sql MengChun Lam
 
Lecture10 ie321 dr_atifshahzad
Lecture10 ie321 dr_atifshahzadLecture10 ie321 dr_atifshahzad
Lecture10 ie321 dr_atifshahzadAtif Shahzad
 
Geek Sync | SQL Server Indexing Basics
Geek Sync | SQL Server Indexing BasicsGeek Sync | SQL Server Indexing Basics
Geek Sync | SQL Server Indexing BasicsIDERA Software
 
No sql or Not only SQL
No sql or Not only SQLNo sql or Not only SQL
No sql or Not only SQLAjay Jha
 
Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)Wajahat Shahid
 
Sap abap database table
Sap abap database tableSap abap database table
Sap abap database tableDucat
 
[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace concept[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace conceptaltistory
 
Databasesmycopy
DatabasesmycopyDatabasesmycopy
DatabasesmycopyMR Z
 
Sql server 2014 x velocity – updateable columnstore indexes
Sql server 2014 x velocity – updateable columnstore indexesSql server 2014 x velocity – updateable columnstore indexes
Sql server 2014 x velocity – updateable columnstore indexesPat Sheehan
 
Importing data in Oasis Montaj
Importing data in Oasis MontajImporting data in Oasis Montaj
Importing data in Oasis MontajAmin khalil
 

La actualidad más candente (20)

Intro to XML in libraries
Intro to XML in librariesIntro to XML in libraries
Intro to XML in libraries
 
XML - SAX
XML - SAXXML - SAX
XML - SAX
 
XSL - XML STYLE SHEET
XSL - XML STYLE SHEETXSL - XML STYLE SHEET
XSL - XML STYLE SHEET
 
SQL Server Columnstore
SQL Server ColumnstoreSQL Server Columnstore
SQL Server Columnstore
 
Learn Data Structures With Myassignmenthelp.Net
Learn Data Structures With Myassignmenthelp.NetLearn Data Structures With Myassignmenthelp.Net
Learn Data Structures With Myassignmenthelp.Net
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014
 
Tk2323 lecture 7 sql
Tk2323 lecture 7   sql Tk2323 lecture 7   sql
Tk2323 lecture 7 sql
 
Lecture10 ie321 dr_atifshahzad
Lecture10 ie321 dr_atifshahzadLecture10 ie321 dr_atifshahzad
Lecture10 ie321 dr_atifshahzad
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
 
Geek Sync | SQL Server Indexing Basics
Geek Sync | SQL Server Indexing BasicsGeek Sync | SQL Server Indexing Basics
Geek Sync | SQL Server Indexing Basics
 
Xpath tutorial
Xpath tutorialXpath tutorial
Xpath tutorial
 
No sql or Not only SQL
No sql or Not only SQLNo sql or Not only SQL
No sql or Not only SQL
 
Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)
 
Sap abap database table
Sap abap database tableSap abap database table
Sap abap database table
 
[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace concept[Altibase] 4-1 tablespace concept
[Altibase] 4-1 tablespace concept
 
Databasesmycopy
DatabasesmycopyDatabasesmycopy
Databasesmycopy
 
Sql server 2014 x velocity – updateable columnstore indexes
Sql server 2014 x velocity – updateable columnstore indexesSql server 2014 x velocity – updateable columnstore indexes
Sql server 2014 x velocity – updateable columnstore indexes
 
Importing data in Oasis Montaj
Importing data in Oasis MontajImporting data in Oasis Montaj
Importing data in Oasis Montaj
 
Xml
XmlXml
Xml
 

Destacado

Sql server introduction
Sql server introductionSql server introduction
Sql server introductionRiteshkiit
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance TuningBala Subra
 
Sql server-integration-services-ssis-step-by-step-sample-chapters
Sql server-integration-services-ssis-step-by-step-sample-chaptersSql server-integration-services-ssis-step-by-step-sample-chapters
Sql server-integration-services-ssis-step-by-step-sample-chaptersNadinKa Karimou
 
Lecture 2. MS SQL. Stored procedures.
Lecture 2. MS SQL. Stored procedures.Lecture 2. MS SQL. Stored procedures.
Lecture 2. MS SQL. Stored procedures.Alexey Furmanov
 

Destacado (9)

Addhoc query
Addhoc queryAddhoc query
Addhoc query
 
Sql server introduction
Sql server introductionSql server introduction
Sql server introduction
 
Statistics
StatisticsStatistics
Statistics
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance Tuning
 
Good sql server interview_questions
Good sql server interview_questionsGood sql server interview_questions
Good sql server interview_questions
 
SSIS Presentation
SSIS PresentationSSIS Presentation
SSIS Presentation
 
Sql server-integration-services-ssis-step-by-step-sample-chapters
Sql server-integration-services-ssis-step-by-step-sample-chaptersSql server-integration-services-ssis-step-by-step-sample-chapters
Sql server-integration-services-ssis-step-by-step-sample-chapters
 
SSIS control flow
SSIS control flowSSIS control flow
SSIS control flow
 
Lecture 2. MS SQL. Stored procedures.
Lecture 2. MS SQL. Stored procedures.Lecture 2. MS SQL. Stored procedures.
Lecture 2. MS SQL. Stored procedures.
 

Similar a Order by and join

Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server DatabasesColdFusionConference
 
SAG_Indexing and Query Optimization
SAG_Indexing and Query OptimizationSAG_Indexing and Query Optimization
SAG_Indexing and Query OptimizationVaibhav Jain
 
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAmazon Web Services
 
Data Modeling on Azure for Analytics
Data Modeling on Azure for AnalyticsData Modeling on Azure for Analytics
Data Modeling on Azure for AnalyticsIke Ellis
 
Amazon Redshift - Bay Area CloudSearch Meetup June 19, 2013
Amazon Redshift - Bay Area CloudSearch Meetup June 19, 2013Amazon Redshift - Bay Area CloudSearch Meetup June 19, 2013
Amazon Redshift - Bay Area CloudSearch Meetup June 19, 2013Michael Bohlig
 
Web Application Development using PHP Chapter 6
Web Application Development using PHP Chapter 6Web Application Development using PHP Chapter 6
Web Application Development using PHP Chapter 6Mohd Harris Ahmad Jaal
 
AWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationAWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationVolodymyr Rovetskiy
 
Oracle Database 12c - Features for Big Data
Oracle Database 12c - Features for Big DataOracle Database 12c - Features for Big Data
Oracle Database 12c - Features for Big DataAbishek V S
 
2011 06-sq lite-forensics
2011 06-sq lite-forensics2011 06-sq lite-forensics
2011 06-sq lite-forensicsviaForensics
 
Data Never Lies Presentation for beginners in data field.pptx
Data Never Lies Presentation for beginners in data field.pptxData Never Lies Presentation for beginners in data field.pptx
Data Never Lies Presentation for beginners in data field.pptxTusharAgarwal49094
 
Deep Dive: Amazon Redshift (March 2017)
Deep Dive: Amazon Redshift (March 2017)Deep Dive: Amazon Redshift (March 2017)
Deep Dive: Amazon Redshift (March 2017)Julien SIMON
 

Similar a Order by and join (20)

SQLServer Database Structures
SQLServer Database Structures SQLServer Database Structures
SQLServer Database Structures
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
SAG_Indexing and Query Optimization
SAG_Indexing and Query OptimizationSAG_Indexing and Query Optimization
SAG_Indexing and Query Optimization
 
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
 
Data Modeling on Azure for Analytics
Data Modeling on Azure for AnalyticsData Modeling on Azure for Analytics
Data Modeling on Azure for Analytics
 
IS100 Week 8
IS100 Week 8IS100 Week 8
IS100 Week 8
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Ms access
Ms accessMs access
Ms access
 
Amazon Redshift - Bay Area CloudSearch Meetup June 19, 2013
Amazon Redshift - Bay Area CloudSearch Meetup June 19, 2013Amazon Redshift - Bay Area CloudSearch Meetup June 19, 2013
Amazon Redshift - Bay Area CloudSearch Meetup June 19, 2013
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
 
Web Application Development using PHP Chapter 6
Web Application Development using PHP Chapter 6Web Application Development using PHP Chapter 6
Web Application Development using PHP Chapter 6
 
AWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationAWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentation
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Oracle Database 12c - Features for Big Data
Oracle Database 12c - Features for Big DataOracle Database 12c - Features for Big Data
Oracle Database 12c - Features for Big Data
 
Mysql For Developers
Mysql For DevelopersMysql For Developers
Mysql For Developers
 
2011 06-sq lite-forensics
2011 06-sq lite-forensics2011 06-sq lite-forensics
2011 06-sq lite-forensics
 
Data Never Lies Presentation for beginners in data field.pptx
Data Never Lies Presentation for beginners in data field.pptxData Never Lies Presentation for beginners in data field.pptx
Data Never Lies Presentation for beginners in data field.pptx
 
Rdbms
RdbmsRdbms
Rdbms
 
Deep Dive: Amazon Redshift (March 2017)
Deep Dive: Amazon Redshift (March 2017)Deep Dive: Amazon Redshift (March 2017)
Deep Dive: Amazon Redshift (March 2017)
 

Más de Riteshkiit

Backup and restore
Backup and restoreBackup and restore
Backup and restoreRiteshkiit
 
Database index
Database indexDatabase index
Database indexRiteshkiit
 
Sql server introduction fundamental
Sql server introduction fundamentalSql server introduction fundamental
Sql server introduction fundamentalRiteshkiit
 
Query parameterization
Query parameterizationQuery parameterization
Query parameterizationRiteshkiit
 
Database design
Database designDatabase design
Database designRiteshkiit
 
Sql query performance analysis
Sql query performance analysisSql query performance analysis
Sql query performance analysisRiteshkiit
 
Sql query performance analysis
Sql query performance analysisSql query performance analysis
Sql query performance analysisRiteshkiit
 

Más de Riteshkiit (10)

Backup and restore
Backup and restoreBackup and restore
Backup and restore
 
Database index
Database indexDatabase index
Database index
 
Sql server introduction fundamental
Sql server introduction fundamentalSql server introduction fundamental
Sql server introduction fundamental
 
Query parameterization
Query parameterizationQuery parameterization
Query parameterization
 
Index_2
Index_2Index_2
Index_2
 
Database design
Database designDatabase design
Database design
 
Index
IndexIndex
Index
 
Sql query performance analysis
Sql query performance analysisSql query performance analysis
Sql query performance analysis
 
Sql query performance analysis
Sql query performance analysisSql query performance analysis
Sql query performance analysis
 
Topics
TopicsTopics
Topics
 

Order by and join