-->
Showing posts from August, 2011

Table Size in SQL Server | Find Rows and Disk space Usage

There are two ways to find out the table size; first option will be to run the system stored procedure “sp_spaceUsed” 1: EXEC sp_SpaceUsed ' table_name ' Option 2 uses the dmv sys.dm_…

Generating Calendar in SQL Server 2008

Here is the simple query that generates a calendar. 1: DECLARE @startDay DATE = ' 20110101 ' 2: ,@endDay DATE = ' 20130101 ' 3: 4: ; WITH calendar ( [ Date ], [ Y…
Subscribe Our Newsletter