Renaming a column in Sql Server

 We often need to change the name of a column of a table to a new name. We  can do this with the help of the Exec Sp_rename command.  The Syntax of the Sp_rename is given below:-  Exec sp_rename ‘TableName.[OldColumnName]’, ‘[NewColumnName]’, ‘Column’  For example, suppose we have a table called Employee who has the following structure:- […]

Continue Reading

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 each deleted row but Truncate command do not maintain the logs files for each deleted […]

Continue Reading

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 is given below:- 1)Creation of a table with the help of a create statement For […]

Continue Reading