Union in SQL Server

Union: Union will combine the result of two sql queries into a single result set. Union Specifies that multiple result sets are to be combined and returned as a single result set Syntax:

Points to remember about union operator. The number and the order of the columns must be the same in all queries. […]

Read More

SQL Server Constraints

What are constraint in SQL Server

Constraints :  are used to maintained database integrity, basically constraints are rule by which we restrict the data to be entered into tables. There are two types of constraints. Table level constraints:  use to limit the whole table data. Column level constraints : use to limit only column data. Constraint are used to maintained database […]

Read More

Date and Time Functions in SQL Server

There is a lot of date and Time related system defined functions in sql server as below. CURRENT_TIMESTAMP : return date and time of system where sql instance is installed.  GETDATE ( ) : return date and time of system where sql instance is installed.  GETUTCDATE ( )  : (Coordinated Universal Time).

Function that use with […]

Read More

SQL Server System Databases

When we have installed SQL SERVER , it will have few system databases already installed as listed. These database is required to run the SQL Server.  master  tempdb  model  msdb resource  (Hidden Database ) distribution (Hidden Database ) Master Database:  It is primary database, without it, sql server cannot started. It contained information about the object […]

Read More

SQL Server View

SQL Server View: Views are basically virtual table whose column and rows are defined based on query results. Its more over selection of columns from one or more table. view can be used for the following purposes: To focus, simplify, and customize the perception each user has of the database. As a security mechanism by […]

Read More