SET NOCOUNT ON DECLARE @next char(30)
SELECT @next=' '
WHILE @next is not null 
BEGIN SELECT @next = min(name) FROM sysobjects 
WHERE type = 'U' AND name > @next
EXEC sp_spaceused @next END