SQL Server: Backup and Restore Database using T-SQL
Its very easy to take Backup and Restore your Database using T-SQL even if you are not a DBA. In one of the client application, I wanted to take periodic Backup without logging in to SQL Server...
View ArticleAutoIncrement vs UniqueIdentifier
How to decide which key to used in your application? Whether to use AutoIncrement or UnqiueIdentifier.Please tell me the different scenarios for using these keys.
View ArticleSQL Server 2005 error 10061
I needed to connect to sql server from a remote computer which is on my home lan. But got this error message.read more
View ArticleSet two variables using a Select query in a stored procedure.
SET @Password =(SELECT Value1,Value2 FROM[dbo].[Table1]WHERE[Expr1])I am trying to get both values 'Value1' and 'Value2' in two variables to be used in same SP in next query. Is it possible or do I...
View ArticleIndex in Sql Server
Understanding Indexes Indexes speed up the querying process by providing filtered access to rows in the data tables (just like book’s index) if they are used efficiently.Indexes are created on columns...
View ArticleHow to ReSeed Identity value in SQL Server?
I want to reset an identity coloumn in SqlServer. I am usingDelete from "TableName". It is deleteing all data in the table but it is not resetting my Identity value.I have tried Truncate Table , But I...
View ArticleRow Number function in SQL Server
I used to create temporary tables and subqueries to add a row number to every row in the result set. But somedays ago, I came across to the Row_Number() function provided in Sql Server, which simply...
View ArticleDifference between Delete and Truncate
Removing records from a table is a crucial operation. So I would like to pen down my knowledge about removing records from a table. There are two ways to do the same, Truncate and Delete.I would like...
View ArticleDelete Duplicate Records From a table
I need to clean duplicate records from a table, please let me know how to it.
View ArticleHow Sql Joins Works
To make this article, I have taken Table A and Table B as reference tables for explaining.SELECT*FROM A id name RowState ----------- ------------------------------ -------- 1 A1 1 2 A2 1 3 A3 0 4 A4 0...
View Article