Skills SQL Server TSQL: Difference between revisions

From MillerSql.com
NeilM (talk | contribs)
NeilM (talk | contribs)
 
Line 98: Line 98:


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


== Dynamic SQL ==
== Dynamic SQL ==

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:...

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

Used at:...

Pivot

Used at:...

Pivot function

Unpivot function

Union

Used at:...

Union

Union All

Datatypes

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

Dynamic SQL

Used at:...

Dynamic SQL

SQL Injection

Other

Cursors

BCP - Bulk copy protocol

Triggers