• Though I was wrong in my answer but now I can understand or I think I understand why it will return NULL.

    You can alter the procedure and drop the procedure within the same procedure so this will eliminate two options from the answer

    It is not recrusive eliminating the third option also

    Now between error message of GO and NULL.

    GO will consider as the above T-SQL ready to go as a batch only if it the first word in the line.

    For example this will fail,

    CREATE PROC

    GO AS -- As go it the first word in the line

    BEGIN

    EXEC ('ALTER PROC GO AS SELECT NULL')

    EXEC GO

    DROP PROC GO

    END

    GO

    EXEC GO


    Kindest Regards,

    Amit Lohia