What are Catalog Views?

Catalog Views were introduced by Microsoft in SQL Server 2005 to store the Meta data which is related to all databases in our server. Provide the most efficient way to access the metadata. Do not contain data about Database backup, Replication, and

Read More

What is the difference between Control flow and Data flow?

Control Flow: Controls the flow of executions in SSIS package It’s Process oriented Smallest unit is Task Made up of Tasks connected with precedence constraints Tasks in Control flow need to be completed before moving to the next task Data Flow: Transfers

Read More

What is the foreign key constraint and what is the need of it on a Table?

Foreign key Foreign key is a field or combination of fields which matches its values with a Primary key in another table. That means, foreign key is like a link between two tables. This is also called as a Referencing key.  

Read More

What is the major difference between UNION and UNION ALL?

UNION: Selects only distinct records First Selects all records and then takes distinct records from it Slower than UNION ALL UNION ALL: Selects all values from all the result sets. Duplicates will not be eliminated Selects all values from all the result

Read More

What is an Identity property?

An Identity Column in a table is a column whose values are generated automatically by SQL Server. The values of this column gives the Identity for each row.                  It works only for Integer columns

Read More

Why do we use Stored Procedures?

There are lot of Advantages of creating a stored procedure instead of running DB scripts individually. Below are the major reasons which tell us why we use stored procedures in DB. The Best feature of stored procedures is, compile once and execute

Read More

Order by

Order by Order by clause is used to sort the records of a result set in ascending or descending order. It can be applied to more than one column. We use two keywords to sort the records. ASC and DESC. ASC is

Read More

Where Clause

Where Where clause is used to filter the records returned by the query. It works on all DML (Data Manipulation Language) statements. We can also use where for more than one column by taking the combination of AND/OR operators. We can not

Read More

The Alias

Alias Name Alias name is a name which is given to a database Table or a column temporarily. Generally we create Alias by using the keyword called ‘AS’.  We can also create without this keyword as ‘AS’ keyword is optional in SQL Server.

Read More

The TOP Clause

TOP The TOP clause is used to return top N records from the result set. We can also fetch the required percentage rows from the result set. Syntax: SELECT TOP Number/Percent <Column Name(s)> FROM Table_Name; Examples: TOP with Number: ———————————————————————- USE [AdventureWorks2012];

Read More