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 Tutorials
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 DISTINCT Clause T-SQL Tutorial with Examples
The SELECT DISTINCT Clause is used to fetch distinct values in a specific column of a given table. This is Part 3 of 40 Part SQL Server T-SQL Tutorial. Click here to read it from the beginning…. SELECT DISTINCT Syntax...
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 Server SELECT Statement T-SQL Tutorial with Examples
The SELECT Statement is used to query the data stored in a given table of a database. The data which is returned by executing the SELECT statement is referred as result-set. Within a database data is stored within...
SERVERPROPERTY Function T-SQL Enhancement in SQL Server 2016
SERVERPROPERTY is an inbuilt function which gives you information about the server instance. This is Part 10 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the...
STRING_SPLIT Function and STRING_ESCAPE Function in SQL Server 2016
SQL Server 2016 introduces two new string functions namely STRING_SPLIT and STRING_ESCAPE. This is Part 8 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the...
COMPRESS and DECOMPRESS T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces two new system functions namely COMPRESS and DECOMPRESS. This is Part 7 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the beginning…...
ALTER DATABASE SET AUTOGROW_ALL_FILES T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces two new options to ALTER DATABASE statement which can be used to modify database files namely AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES. In the earlier versions of SQL Server...
ALTER DATABASE SET AUTOGROW_SINGLE_FILE T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces two new options to ALTER DATABASE statement which can be used to modify database files namely AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES. In the earlier versions of SQL Server...
ALTER TABLE WITH (ONLINE=ON | OFF) T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces an interesting T-SQL enhancement to improve performance and reduce downtime ALTER TABLE WITH (ONLINE = ON | OFF). This statement will help you alter data types, change column/table collation...
DROP IF EXISTS T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces a new DROP IF EXISTS statement to DROP objects such as tables, columns, indexes, stored procedures, schemas, triggers and user-defined functions. DROP IF EXISTS statement can be used to check...
TRUNCATE TABLE WITH PARTITIONS T-SQL Enhancement in SQL Server 2016
It is a well known fact that TRUNCATE TABLE is faster than DELETE statement. TRUNCATE TABLE uses lesser system resources and transaction log file when compared to a DELETE statement. This is Part 2 of 10 Part T-SQL...
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
DIFFERENTIAL database backup will only record the data which has changes since the last successful full database backup. This backed up data is known as differential base. When compared to full database backups the...
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 full database 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 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 transactional log file and once the transaction...
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...