Sql Server 2005
Row Number function in SQL Server
Submitted by vaibhav on Fri, 06/18/2010 - 16:31I 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 constructs the row number column on the fly as part of the query. But a question might have arosed in your mind, What is the use of adding a Row_Number, when we have serial number associated with every row. There are several situation, where we need to query against the row number.(we can't query against a serial number)
How to ReSeed Identity value in SQL Server?
Submitted by vaibhav on Tue, 06/15/2010 - 18:05I want to reset an identity coloumn in SqlServer. I am using
Delete 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 will not be able to restore my data back in case of truncate.
I need a method to delete all rows from the table and simultaneosly reset the identity value.
What is the difference between Stored Procedures and User Defined Functions?
Submitted by vaibhav on Fri, 02/12/2010 - 20:20What is the difference between Stored Procedures and User Defined Functions in sqlserver.
Index in Sql Server
Submitted by shantanu on Wed, 01/06/2010 - 04:29Understanding 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 in tables or views.