Yearly Archives: 2009

Sql Server- Difference between Stored Procedure and Function

In Sql Server, both functions and stored procedures can be defined as the logically grouping of Sql statements formed to complete a task, but still there are many differences between Stored procedure and Functions. These differences can be summarized as … Continue reading

Posted in Imp SQL Difference, Interview Questions, SQL Functions, SQL Server, SQL Stored Procedure | Tagged | 6 Comments

Difference between Delete and Truncate Command

Although the Delete and Truncate Commands logically does the same work of deleting the rows from the table but still there are many differences in their working. These differences are given below:- 1) Delete command maintained the logs files of … Continue reading

Posted in Imp SQL Difference, Interview Questions, SQL Basic Concepts, SQL Server | Tagged | 1 Comment

Sql Server – How to write a Stored procedure in Sql server

Stored Procedure:- Stored Procedure In Sql server can be defined as the set of logically group of sql statement which are grouped to perform a specific task. There are many benefits of  using a stored procedure. The main benefit of  … Continue reading

Posted in Most Imp SQL Concepts, SQL Server, SQL Stored Procedure | Tagged , , | 42 Comments

Sql Server – Union and Union All

Union and Union All, both are used to select data from one or more than one tables but still they have some differences. For Example, Union is used to select distinct data from the tables but Union All allows duplicate … Continue reading

Posted in SQL Server, SQL Union Function | Tagged | 31 Comments

IDENTITY Property in SQL Server

  IDENTITY  Property Sometimes we need a column whose values can uniquely identifying the rows in the table. To achieve this purpose, this column should contains the unique values and it can’t contains the NULL or empty values. We can … Continue reading

Posted in SQL Basic Concepts, SQL Server | Tagged , | 33 Comments

How to make database offline or online

Database is made offline to move its physical files. There can be many ways to make a database offline. But there are three main methods which are used frequently to make the database offline. These methods are given below:- CodeProject … Continue reading

Posted in SQL Basic Concepts, SQL Server | Tagged , | 2 Comments

Different ways to create a table and insert data into the table

Introduction Tables can be defined as the structure which contains the data in the database. This article discuss about the different ways to create a table and insert data into the table. Some of the ways to create a table … Continue reading

Posted in SQL Basic Concepts, SQL Server | Tagged , , | 1 Comment

Difference between Primary key and Unique key

var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”); document.write(unescape(“%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”)); try { var pageTracker = _gat._getTracker(“UA-11608194-1”); pageTracker._trackPageview(); } catch(err) {} Both Primary key and Unique key enforce uniqueness of the column on which … Continue reading

Posted in Imp SQL Difference, Interview Questions, SQL Primary Key Constraint, SQL Server | Tagged | 30 Comments

Difference between Subquery, Nested Subquery and Correlated Subquery

Difference between Subquery, Nested Subquery and Correlated Subquery Query Query can be defined as a way to inquire the data from the database. It is used to extract the data from one table or multiple tables depending upon the user … Continue reading

Posted in Interview Questions, Most Imp SQL Concepts, SQL Queries Sub-queries, SQL Server | Tagged , , | 102 Comments

Sql server Constraints – Primary Key, Foreign Key, Unique Key, Not Null, Check Constraints

Introduction A constraint is a property that is assigned to a column or a group of columns to prevent incorrect or corrupt data from entering into the tables. These constraints ensure the accuracy and reliability of the data into the … Continue reading

Posted in Most Imp SQL Concepts, SQL Primary Key Constraint, SQL Server | Tagged , , , | 31 Comments