The ‘Database’ Archives
Posted May 28, 2015 by

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

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

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

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

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”

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

Posted March 2, 2015 by

SQL Server: Error Logging and Reporting within a Stored Procedure

As the number of stored procedures increases in a database, the burden of managing those stored procedures increases, too. On a production database, thousands of procedures are executed daily, so you are required to know why a stored procedure failed at a certain time. This can be done by implementing error logging and reporting within […]

Category Database, SQL Server

Posted August 22, 2014 by

Working with NULL Values in SQL Server

We cannot predict values for most future data points while working with database systems. For example, tables used for customer information often have a mobile number column. It is possible that a customer does not hold a mobile number, or for reasons of privacy, he does not want to share his mobile number. In such […]

Category Database, SQL Server

Posted August 20, 2014 by

Finding Duplicate Records Using GROUP BY in SQL Server

There are various times when we need to find duplicate records in SQL Server. It is possible to find duplicates using DISTINCT, ROW NUMBER as well as the GROUP BY approach.

Category Database, SQL Server

Posted August 18, 2014 by

Is_ms_shipped Property in SQL Server

Most of the time, we need to search for objects using metadata (data about data) to get information about SQL Server. For example, we use a query to find which version of SQL server is running on a particular machine. Metadata helps us to find settings and configurations for various objects in our database.

Category Database, SQL Server

Posted July 22, 2014 by

View and Edit Two Files Side By Side in SQL Server and Notepad++

Notepad++ is the editor that programmers prefer most because it is fast and lightweight. It is also bundled with tons of features and smart plugins. Notepad++ can be downloaded for free and is available on Windows as well as other operating systems. There are various tips and tricks that you can use to increase your […]

Posted July 21, 2014 by

Select Text Columns or Boxes Vertically in Notepad++ and SQL Server 2012

In any source code, we frequently need to select a piece of text vertically (column mode). This is not possible with typical editors such as Notepad or Wordpad. Vertically selecting text columns or boxes is one of the coolest tricks everyone should know in order to save time and increase productivity. This tutorial explains how […]

Category Database, SQL Server

Posted February 2, 2014 by

Inner and Left Outer Join with Where Clause vs ON Clause

database join featured article

Filtering results with the [ON] clause and the [Where] clause using LEFT OUTER JOIN and INNER JOIN is a very powerful technique.