• This is an idea on how to do it. It's not perfect as the NULLS will be sorted first. I'm sure that you'll be able to handle that.

    DECLARE @RowCount int;

    SELECT TABLE_CATALOG

    ,TABLE_SCHEMA

    ,TABLE_NAME

    ,COLUMN_NAME

    ,ORDINAL_POSITION

    INTO #Columns

    FROM INFORMATION_SCHEMA.columns;

    SET @RowCount = @@ROWCOUNT;

    WITH cteShort(N) AS(

    SELECT TOP(15 - (@RowCount % 15)) N

    FROM(VALUES(NULL),(NULL),(NULL),(NULL),(NULL), --5

    (NULL),(NULL),(NULL),(NULL),(NULL), --10

    (NULL),(NULL),(NULL),(NULL),(NULL))e(N) --15

    )

    SELECT *

    FROM #Columns

    UNION ALL

    SELECT NULL

    ,NULL

    ,NULL

    ,'~~~'

    ,NULL

    FROM cteShort

    ORDER BY TABLE_CATALOG DESC;

    DROP TABLE #Columns;

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2