The result set is declared in the derived table or view. This should match the result_names in the procedure but the former will take precedence on the latter. If an actual result row is shorter than the declared set, the missing columns will default to NULL.