The ‘Database’ Archives
Posted August 30, 2015 by

SQL Server: Enable and Refresh the IntelliSense Local Cache

feature-sql1

SQL Server IntelliSense is one of the smartest built-in tools to increase productivity while programming in SQL Server. However, it is not perfect. Often, when we create new objects like tables, stored procedures, or triggers and try to use them instantly in another code, SQL Server IntelliSense does not pick up those object names and […]

Category Database, SQL Server

Posted August 28, 2015 by

SQL Server: SET NOCOUNT ON Statement with Examples

feature-sql1

SET NOCOUNT ON is a set statement which prevents the message which shows the number of rows affected by T-SQL query statements. This is used within stored procedures and triggers to avoid showing the affected rows message. Using SET NOCOUNT ON within a stored procedure can improve the performance of the stored procedure by a […]

Category Database, SQL Server

Posted August 26, 2015 by

SQL Server: Union vs Union All

feature-sql1

Union and Union All are used to combine two or more result sets in SQL. A Union set operator is different from SQL Joins. Union combines two sets whereas SQL Joins combines two or more columns based on a matching row condition. This tutorial describes the differences between Union and Union All based on function […]

Category Database, SQL Server

Posted June 14, 2015 by

Sargable Queries in SQL Server with Examples

feature-sql1

The most interesting part of my job is performance tuning and optimization in T-SQL. The heart of performance tuning in an SQL server is proper and usable indexing on tables through the use of Sargable queries.

Posted June 2, 2015 by

Top Clause in SQL Server with Examples

feature-sql1

Most of the time in real life, we try to find the top three scores in a class, the top five runners in a marathon, or the top 10 goals of the month. SQL server has a feature to select the TOP n records from a table.

Category Database, SQL Server

Posted May 28, 2015 by

DML, DDL, DCL and TCL Statements in SQL with Examples

feature-sql1

SQL language is divided into four types of primary language statements: DML, DDL, DCL and TCL. Using these statements, we can define the structure of a database by creating and altering database objects, and we can manipulate data in a table through updates or deletions. We also can control which user can read/write data or […]

Category Database, SQL Server

Posted May 27, 2015 by

Alter Statements in SQL Server with Examples

feature-sql1

Alter Table is a DDL (Data Definition Language) statement which is used to add, drop, or alter existing columns. With this statement, you can also rename a table or column and make constraints. Using a table as an example, this tutorial demonstrates alter table statements with syntax.

Category SQL Server

Posted April 7, 2015 by

Replace Function in SQL Server

feature-sql1

A replace function in SQL Server is used to replace single or multiple characters with another single or multiple-character string.

Category Database, SQL Server

Posted April 4, 2015 by

How to Identify the Recovery Model of a Database in SQL Server

feature-sql1

SQL Server backup and restore operations are closely associated with recovery models. Recovery models are ways to manage how transactions are logged, whether or not the transaction log allows and requires backups, and what types of restore operations are possible. Recovery models helps us to bring back and preserve a database after any unexpected failure […]

Category Database, SQL Server

Posted March 31, 2015 by

Solution for SQL Server Error “Saving Changes is Not Permitted”

feature-sql1

By default, SQL server has added some limitations. For instance, changing data types in design mode, adding a column in the middle of two existing columns, and changing the null-ability of an existing column are not permitted to change from design mode in SQL server management studio (SSMS) because they require a table to be […]

Category Database, SQL Server