Skills SQL Server TSQL: Difference between revisions

From MillerSql.com
NeilM (talk | contribs)
Created page with "Window functions Group by/aggregation WHERE clause / Having Use of SQL Server CTEs (Common Table Expressions). Sort by Subqueries Views Joins"
 
NeilM (talk | contribs)
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
Window functions
<div class="mw-collapsible mw-collapsed" style="width:400px; overflow:auto;">
  <div>''Used at:...''</div>
  <div class="mw-collapsible-content">
  ''Used at: ''
  ''[[Role_MUFG_Securities|MUFG Securities]]''
  ''[[Role_SSE_Energy_GDPR|SSE_Energy_GDPR]]''
  ''[[Role_ING_Investment_Management|ING Investment Management]]''
  </div>
</div>
== Standard SQL ==
Select, Insert, Update, Delete, Truncate, Merge, tables, columns


Group by/aggregation
== Window functions ==


WHERE clause / Having
OVER (ORDER BY col1)


== Group by/aggregation ==
== WHERE clause / Having ==
== CTE - Common Table Expressions ==
<div class="mw-collapsible mw-collapsed" style="width:400px; overflow:auto;">
  <div>''Used at:...''</div>
  <div class="mw-collapsible-content">
  ''Used at: ''
  ''[[Role_MUFG_Securities|MUFG Securities]]''
  </div>
</div>
Use of SQL Server CTEs (Common Table Expressions).
Use of SQL Server CTEs (Common Table Expressions).


Sort by
== Sorting ==
Order By
 
Desc - descending order
 
== Sub-queries ==
 
== Views ==
 
== Joins ==
 
Inner Join
 
Left Join
 
Cartesian joins (cross-products) with no where clause
 
== Indexes and keys ==
Primary keys
 
Foreign keys
 
Unique keys
 
Clustered indexes
 
Non-clustered indexes
 
Index Rebuilds
 
Index/table statistics refreshing
 
== Stored Procedures ==
<div class="mw-collapsible mw-collapsed" style="width:400px; overflow:auto;">
  <div>''Used at:...''</div>
  <div class="mw-collapsible-content">
  ''Used at: ''
  ''[[Role_MUFG_Securities|MUFG Securities]]''
  ''[[Role_Five_Guys|Five Guys]]''
  ''[[Role_Premier_Foods|Premier Foods]]''
  ''[[Role_Autodata|Autodata]]''
  </div>
</div>
 
== Pivot ==
<div class="mw-collapsible mw-collapsed" style="width:400px; overflow:auto;">
  <div>''Used at:...''</div>
  <div class="mw-collapsible-content">
  ''Used at: ''
  ''[[Role_Autodata|Autodata]]''
  </div>
</div>
Pivot function
 
Unpivot function
 
== Union ==
<div class="mw-collapsible mw-collapsed" style="width:400px; overflow:auto;">
  <div>''Used at:...''</div>
  <div class="mw-collapsible-content">
  ''Used at: ''
  ''[[Role_Autodata|Autodata]]''
  </div>
</div>
Union
 
Union All
 
== Datatypes ==
Int, VarChar(8000), nVarChar(4000), DateTime, Image, XML..
 
== Dynamic SQL ==
<div class="mw-collapsible mw-collapsed" style="width:400px; overflow:auto;">
  <div>''Used at:...''</div>
  <div class="mw-collapsible-content">
  ''Used at: ''
  ''[[Role_Autodata|Autodata]]''
  </div>
</div>
Dynamic SQL
 
SQL Injection


Subqueries
== Other ==
Cursors


Views
BCP - Bulk copy protocol


Joins
Triggers

Latest revision as of 22:01, 8 October 2024

Standard SQL

Select, Insert, Update, Delete, Truncate, Merge, tables, columns

Window functions

OVER (ORDER BY col1)

Group by/aggregation

WHERE clause / Having

CTE - Common Table Expressions

Used at:...
  Used at: 
  MUFG Securities

Use of SQL Server CTEs (Common Table Expressions).

Sorting

Order By

Desc - descending order

Sub-queries

Views

Joins

Inner Join

Left Join

Cartesian joins (cross-products) with no where clause

Indexes and keys

Primary keys

Foreign keys

Unique keys

Clustered indexes

Non-clustered indexes

Index Rebuilds

Index/table statistics refreshing

Stored Procedures

Pivot

Used at:...
  Used at: 
  Autodata

Pivot function

Unpivot function

Union

Used at:...
  Used at: 
  Autodata

Union

Union All

Datatypes

Int, VarChar(8000), nVarChar(4000), DateTime, Image, XML..

Dynamic SQL

Used at:...
  Used at: 
  Autodata

Dynamic SQL

SQL Injection

Other

Cursors

BCP - Bulk copy protocol

Triggers