SELECT CASE WHEN (GROUPING(sob.name)=1) THEN 'All_Tables'    ELSE ISNULL(sob.name, 'unknown') END AS Table_name,    SUM(sys.length) AS Byte_Length FROM sysobjects sob, syscolumns sys WHERE sob.xtype='u' AND sys.id=sob.id GROUP BY sob.name WITH CUBE Reference : Pinal Dave (http://blog.SQLAuthority.com) Continue Reading...
Source: SQL SERVER – Query to Find ByteSize of All the Tables in Database | Journey to SQL Authority with Pinal Dave
No comments:
Post a Comment