You are on page 1of 7

https://www.tutorialgateway.

org/sql/

SQL Server Tutorial

The SQL Server (Structured Query Language) is the set of instructions used to
interact with a relational database.
SQL statements are aimed to Insert, Update or Manipulate, and Extract data from
the Relational Database Management Systems.

In this SQL Tutorial, we will show the best way to learn Sql Server and explain
everything about it.
Which includes: How to create, alter, delete databases and tables. DML, DDL
statements, Built-in functions etc.

Best way to Learn SQL Tutorial


This section of SQL Tutorial explains about the creating Databases, Tables. Next,
inserting,
updating, selecting data from tables using filters,
sorting etc.
Learn SQL Database
Install Software
Install Adventure Works Database
Attach Database
Detach Database
Restore Database
Create, Rename, and Delete a Database
Rename Database along with Files
Get Database Names
Tables
Create Table
ALTER Table
Rename Table
Get Table Names
Add Column
Rename Column
Get Column Names
Local and Global Temporary Tables
Table Variable
Derived Tables
Data Type
Data Types
DataLength
Learn SQL Statements
This sections explains the DDL, and DML commands available to work with database.

DML, DDL, DCL, and TCL Commands


SELECT Statement
ALIAS Column
Select Distinct Statement
Select Into Statement
Insert Into Select Statement
Insert Statement
Update Statement
Delete Statement
Truncate Table
Bulk Insert Statement
Query Builder
Pivot
UnPivot
Merge
SubQuery
CASE Statement
Common Table Expressions (CTE)
Coalesce
IS NULL
IS NOT NULL
Clauses
List of Clauses with examples
Group By Clause
Having Clause
Order By Clause
Top Clause
Where Clause
Constraints and Indexes
Primary Key
Foreign Key
Referential Integrity
Check Constraint
Default Constraint
Unique Constraint
Clustered Index
Non-Clustered Index
Filtered Index
SQL Joins Tutorial
Joins
Cross Join
Full Join
Inner Join
Left Join
Right Join
Self Join
SQL Tutorial on Operators
The following gar the list of available operators and statement.

And & Or Operators


Arithmetic Operators
Between Operator
Comparison Operators
Exists
Except
Intersect
In Operator
Like Operator
Not Exists
Not In Operator
Union
Union All
SQL Tutorial on Decision Making Statements
If Else Statement
Else If Statement
While Loop
Nested While Loop
Break Statement
Continue Statement
Goto Statement
IIF Function
Choose Function
SQL Advanced Tutorial
This is an advanced SQL tutorial section. Here, you learn about View,
Stored procedures, triggers, functions, Cursors etc.

Change Data Capture


Table partition
Table Partitioning using Management Studio
Try Catch
Views
User Defined Functions
Alter User Defined Functions
Stored Procedures
Introduction to Stored Procedures
Select Statement Inside the Stored procedure Example
Insert Statement Inside a Stored Procedure Example
Update Statement within the Stored Procedure
Input Parameters in a Stored Procedures
Output Parameters in a Stored Procedure
Return Values in a Stored Procedure
Insert Stored Procedure output into Temporary Table
Useful System Stored Procedures
Triggers
Introduction to Triggers
After Insert
Instead Of Insert
After Update
Instead Of Update
After Delete
Instead Of Delete
Cursors
Static Cursor
Dynamic Cursor
Forward_Only Cursor
Fast_Forward Cursor
Keyset
Transactions
Transactions
Nested Transactions
ACID Properties
SQL Server Management Studio
Management Studio (SSMS) Introduction
Install Management Studio (SSMS)
Uninstall Management Studio (SSMS)
Connect to Server using sqlcmd
SSMS Tasks
Create Login – SQL Server Authentication
Create a Windows Login
Creating Server Roles
Login Errors
Back Up Database
Maintenance Plan
Restore database from .bak file
SQL Server Built-in Functions
Following are the list of available built-in functions in SQL Server
SQL tutorial on Ranking Functions
The List of available Ranking functions are:

Introduction to Ranking Functions


Rank
Dense_Rank
Ntile
Row_NumberR
SQL tutorial on Mathematical Functions
The following are the list of mathematical function in SQL Server

Introduction
ABS
ACOS
ASIN
ATAN
ATN2
CEILING
COS
COT
DEGREES
EXP
FLOOR
LOG
LOG10
PI
POWER
RADIANS
RAND
ROUND
SIGN
SIN
SQRT
SQUARE
TAN
SQL Tutorial on String Functions
The following are the list of available string function in SQL Server:

Introduction
ASCII
CHAR
CHARINDEX
CONCAT
CONCAT_WS
DIFFERENCE
FORMAT
LEN
LEFT
LTRIM
LOWER
NCHAR
PATINDEX
QUOTENAME
REPLACE
REPLICATE
REVERSE
RIGHT
RTRIM
SOUNDEX
SPACE
STR
STRING_AGG
STRING_ESCAPE
STRING_SPLIT
STUFF
SUBSTRING
TRANSLATE
TRIM
UNICODE
UPPER
SQL Tutorial on Aggregate Functions
Below section will show you the list of aggregate function available in SQL Server

Introduction
AVG
CheckSum_Agg
COUNT
COUNT_BIG
GROUPING
GROUPING_ID
MAX
MIN
STDEV
STDEVP
SUM
VAR
VARP
Learn SQL Date Functions
Use this section to learn Sql Server data functions, which includes getting data,
formatting date and time etc.

Introduction
Current_TimeStamp
DateFromParts
DateTimeFromParts
DateTime2FromParts
Datetimeoffsetfrompart
DateAdd
DatePart
DateName
DateDiff
DAY
EoMonth
GetDate
GetUtcDate
Month
Smalldatetimfrompart
SwitchOffset
SysDateTime
SysDateTimeOffset
SysUtcDateTime
TimeFromParts
ToDateTimeOffset
Year
Date&time formats
Logical Functions
IIF Function
Choose Function
Learn SQL Analytic Function
Cume_Dist
First_Value
Last_Value
Lag
Lead
Percentile_Cont
Percentile_Disc
Percent_Rank
Conversion Function
Cast
Try_Cast
Convert
Try_Convert
Parse
Try_Parse
Configuration Functions
@@Language
@@LangId
@@Max_Connections
@@Max_Precision
@@ServerName
@@ServiceName
@@SpId
@@Version
System Functions
@@Identity
@@pack_Received
IsNull
IsNumeric
Error_Line
Error_Number
Error_Message
Error_Severity
Error_State
Host_Id
Host_Name
System Statistical
@@Connections
@@CPU_Busy
@@Idle
@@IO_Busy
@@Pack_Sent
@@Packet_Errors
@@TimeTicks
@@Total_Read
@@Total_Write
@@Total Errors
SET Statements
DateFirst
DateFormat
Language
NoCount On
RowCount
XML Functions
For XML Raw
For XML Auto
XML Path
SQL Interview Questions and FAQ’s
The following are the list of both Frequently Asked Questions and the Interview
Questions.

Basic Connections and Configurations


Create ODBC Connection
Create ODBC Connection- Using Native Client
Connecting to R programming
Configure Database Mail
Create Native Client 11.0 Connection
Tables and Columns
Get Column Names from Table
How to Swap Column Values
How to check if a Table Exists
Identity Value Jumps after restarting
Find all Dependencies on Table
Find all Tables that Contain Specific Column Name
Rename Table Name, and Column Name
Date and Time
Formatting DATE
Return Date Part Only from a DateTime datatype
Differences
Difference between DATEPART and DATENAME
Difference between UNION and UNION ALL
Differentiate between CTE, Temp Tables, Derived tables, Table Variables
Joins
Cross Join Vs Inner Join
List of Outer Joins
Groups
Count Records in a Group
Retrieve the Last Record in each Group
Select Top N Records for each Category
How to Select First Row in each group
Select, Insert, Update, and Delete
Delete Duplicate Rows
Inserting values into Identity Column using IDENTITY INSERT
Insert Stored Procedure result into Temporary Table
Insert Images into Table
Select Rows with Maximum Value on a Column
Select All If Parameter is Empty or NULL
UPDATE Table Columns from SELECT Statement
Strings
Concatenate Rows into String
Replace String in a Table Column
Reverse String Words
Extract Domain From Email
Misc
Calculating Running Total
Converting Rows into Columns without using PIVOT
Converting Column Names into Rows without using UNPIVOT
Export Data to CSV
Nth Highest Salary
Backup Database Automatically

You might also like