DROP TABLE aaa
CREATE TABLE aaa
(name varchar(256),
rows varchar(256),
reserved varchar(256),
data varchar(256),
index_size varchar(256),
unused varchar(256),
irows int,
ireserved int,
idata int,
)
declare @tabname as varchar(100)
DECLARE table_cursor CURSOR FOR
SELECT name FROM sys.tables ORDER BY name
OPEN table_cursor
-- Perform the first...