The WHERE Clause is used to fetch records from a table which meets the condition mentioned in the WHERE Clause. This is Part 5 of 40 Part SQL Server T-SQL Tutorial. Click here to read it from the beginning…. WHERE...
Category - SQL Server Tutorial
SQL Server ORDER BY Clause T-SQL Tutorial with Examples
The ORDER BY Clause is used to order the result set in ascending or descending order. By default, when ORDER BY clause is used the result set is ordered in the ascending order. This is Part 4 of 40 Part SQL Server T-SQL...
SQL Server SELECT TOP Clause T-SQL Tutorial with Examples
The SELECT TOP Clause is used to specify the percentage of rows or to specify the number of rows which needs to be retrieved from a given table. This is Part 2 of 40 Part SQL Server T-SQL Tutorial. Click here to read it...
SQL SELECT | SQL QUERY | SQL SELECT Statement T-SQL Tutorial with Examples
SQL SERVER SELECT Statement | SQL SELECT TABLE | SQL SELECT | SQL QUERY The “SQL SELECT statement” is used to select data from a database. In SQL SERVER, the SELECT Statement is used to query the data stored...
SERVERPROPERTY T-SQL Enhancement in SQL Server 2016
Discover the essential SERVERPROPERTY enhancements in SQL Server 2016. In this final part of our 10-part T-SQL series, we show you how to natively track ProductUpdateLevel (CU/SP) and find default file paths without...
STRING_SPLIT Function and STRING_ESCAPE Function in SQL Server 2016
SQL Server 2016 introduced STRING_SPLIT and STRING_ESCAPE to simplify string manipulation. While STRING_SPLIT replaces inefficient User Defined Functions (UDFs) for parsing delimited lists, STRING_ESCAPE provides a...
COMPRESS and DECOMPRESS T-SQL Enhancement in SQL Server 2016
Learn how to implement native GZIP compression in SQL Server 2016 using COMPRESS and DECOMPRESS functions. This guide covers syntax, storage benefits, and performance trade-offs when handling large text, JSON, or XML...
ALTER DATABASE SET AUTOGROW_ALL_FILES T-SQL Enhancement in SQL Server 2016
Learn how to enable AUTOGROW_ALL_FILES in SQL Server 2016 and higher versions to optimize the proportional fill algorithm. Eliminate disk I/O hotspots and TempDB contention by ensuring all files in a filegroup grow...
AUTOGROW_SINGLE_FILE in SQL Server 2016: Syntax & TF 1117 Comparison
Learn how to use AUTOGROW_SINGLE_FILE in SQL Server 2016 to manage database file growth. This guide compares the new T-SQL enhancement to legacy Trace Flag 1117, explaining how to optimize storage while avoiding I/O...
ALTER TABLE WITH (ONLINE=ON | OFF) T-SQL Enhancement in SQL Server 2016
SQL Server 2016 simplifies database maintenance with the DROP IF EXISTS T-SQL enhancement. This feature eliminates the need for legacy object existence checks using IF IF EXISTS or sys.objects. Learn how to drop tables...
DROP IF EXISTS – Simplifying Database Cleanup Scripts in SQL Server 2016
SQL Server 2016 simplifies database maintenance with the DROP IF EXISTS T-SQL enhancement. This feature eliminates the need for legacy object existence checks using IF EXISTS or sys.objects. Learn how to drop tables...
How to Truncate Specific Partitions in SQL Server (Fast & Efficiently)
Learn how to use TRUNCATE TABLE WITH PARTITIONS in SQL Server 2016 to clear specific data ranges instantly with minimal logging. Faster than DELETE and SWITCH
TAIL-LOG Backup in SQL Server Step by Step Tutorial with Examples
A tail-log backup captures any log records which has not yet been backed up i.e., the tail of the transaction log to prevent any work loss and to keep the transaction log chain intact. Before you can recover a SQL...
PARTIAL Backup in SQL Server Step by Step Tutorial with Examples
As per MSDN “PARTIAL Backups are designed for use under SIMPLE recovery model; thereby to improve flexibility to backup very large database which contain one or more read-only Filegroups. They are useful whenever...
FILEGROUP Backup in SQL Server Step by Step Tutorial with Examples
Using FILEGROUP backup one can backup all the data files within the SQL Server FILEGROUP individually. While backing up the database you can specify whole of FILEGROUP (i.e., PRIMARY or SECONDARY) instead of specifying...
FILE Backup in SQL Server Step by Step Tutorial with Examples
Using FILE backup one can backup SQL Server Data File individually. While backing up the database you can specify whole of FILEGROUP instead of specifying each database file individually within the FILEGROUP. In case if...
MIRRORED Backup in SQL Server Step by Step Tutorial with Examples
Using MIRRORED Backup feature a DBA can create up to 3 identical copies of a database backup. This feature is available in SQL Server 2005 Enterprise Edition and later versions. This is Part 12 of 16 Part SQL Server...
COPY_ONLY Backup in SQL Server Step by Step Tutorial with Examples
COPY_ONLY backup is a special type of SQL Server Backup which is independent of the sequence of conventional SQL Server backups. Normally whenever you take a backup it will affect how later backups are restored...
TRANSACTION LOG Backups in SQL Server Step by Step Tutorial with Examples
Transaction log backup is only possible when your database is in FULL or BULK-LOGGED recovery model. With the help of Transaction Log backup one can achieve Point in Time recovery for the database in case of any...
DIFFERENTIAL Database Backups in SQL Server Step by Step Tutorial with Examples
What is a Differential Backup SQL Server? Differential Backup SQL Server will only record the data which has changes since the last successful full database backup. Differential Backup SQL Server | Differential Database...
FULL Database Backups in SQL Server Step by Step Tutorial with Examples
FULL Database Backup is used to back up the whole database in SQL Server. A database full backup will include parts of transaction log so that if the need arises a database can be recovered completely by restoring full...
Permissions Required to Take Database Backup in SQL Server
For a user to take database backups in SQL Server a user must be a member of DBCREATOR Server Role and DB_OWNER Database Role. Else you will receive the below mentioned error while performing backups...
Different Types of SQL Server Backups
SQL Server supports different types of backups for databases. However, which type of a database backup can be performed totally depends upon the recovery model of the database one choose. If you are unclear of the...
SQL Server BULK-LOGGED Recovery Model Step by Step Tutorial with Examples
When a database is configured to use a BULK-LOGGED Recovery Model then SQL Server will log minimal amount of information for operations such as SELECT INTO, BULK INSERT, BCP, CREATE INDEX, ALTER INDEX, and REBUILD INDEX...
SQL Server FULL Recovery Model Step by Step Tutorial with Examples
In Full Recovery Model Point in Time recovery of the database is possible as long as you have all the valid database backups along with the transaction log tail backup file. In Full Recovery model all the transactions...
SQL Server SIMPLE Recovery Model Step by Step Tutorial with Examples
SIMPLE Recovery Model in SQL Server SIMPLE Recovery Model as the name suggests it is the most basic recovery model which is available in SQL Server. In this recovery model every transaction is written to the...
Different SQL Server Recovery Models Step by Step Tutorial with Examples
Recovery Models in SQL Server are basically designed to control the transaction log maintenance and to help you recover your data from a disaster. Based on the choice of Recovery Model, SQL Server decides which data it...
SQL Server Database Backup Tutorial with Examples
Introduction It is very critical for any organization to protect its data within the database. Hence it is must for an organization to perform database backups at regular intervals. In this tutorial, you will learn...
