SQL Server 2008 R2 SP1 Express Edition Download

15 02 2012

Here’s the link to the most recent version of SQL Server Express Edition (at 2012-02-16, the time of this writing):

SQL Server 2008 R2 SP1 Express Edition (10.50.2500.0) Download

Download the file SQLEXPRWT_x64_ENU.exe (329.9 MB) for 64-bit editions of Windows. WT stands for with tools.





Get row count from all tables

29 01 2012

The following T-SQL script generates a view of all table names and the number of rows contained in each table for the current SQL database.

SELECT o.name 'TableName', p.rows 'Rows'
FROM sys.objects o
JOIN sys.partitions p ON o.object_id = p.object_id
WHERE (o.type = 'U')
AND (p.index_id IN (0,1))
ORDER BY p.rows DESC

I found this information here.