Order by and join

2,192 views

Published on

JOIN ORDER BY

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,192
On SlideShare
0
From Embeds
0
Number of Embeds
1,629
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Order by and join

  1. 1. Microsoft Sql Server SELECT Statement
  2. 2. 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
  3. 3. 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.
  4. 4. 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
  5. 5. Data Page
  6. 6. 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
  7. 7. JOINING OF TABLES• INNER JOIN• LEFT OUTER JOIN• RIGHT OUTER JOIN• FULL OUTER JOIN
  8. 8. INNER JOIN
  9. 9. LEFT OUTER JOIN
  10. 10. RIGHT OUTER JOIN
  11. 11. FULL OUTER JOIN
  12. 12. THANK YOU

×