Query to find size of tables in Azure database

Quick and dirty way to find the size of all tables in a azure database.

DROP TABLE #list

DROP TABLE #data GO

CREATE TABLE #data (
    name VARCHAR(100)
    ,rows VARCHAR(100)
    ,reserved VARCHAR(100)
    ,datasize VARCHAR(100)
    ,indexsize VARCHAR(100)
    ,unused VARCHAR(100)
    )

SELECT ' insert into #data exec sp_spaceused ''' + table_schema + '.' + table_name + '''' AS Query
INTO #list
FROM INFORMATION_SCHEMA.TABLEs

ALTER TABLE #list ADD id INT identity (
    1
    ,1
    )

DECLARE @count INT = 0

WHILE @count <= (
        SELECT max(id)
        FROM #list
        )
BEGIN
    DECLARE @q NVARCHAR(1000) = (
            SELECT query
            FROM #list
            WHERE id = @count
            )

    EXEC sp_executesql @q

    SET @count = @count + 1
END
select * from #data