Sample Header Ad - 728x90

What is a "statement batch"?

-2 votes
1 answer
121 views
I know what a statement is and I know what a batch is, but what is a "statement batch"? T-SQL's documentation uses the term in [two](https://learn.microsoft.com/en-us/sql/t-sql/language-elements/throw-transact-sql?view=sql-server-ver16#remarks) [places](https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-oacreate-transact-sql?view=sql-server-ver16#remarks) that I've found. > If a TRY...CATCH construct is not available, the statement batch is terminated. > Any error that occurs in a THROW statement causes the statement batch to be terminated. > The created OLE object is automatically destroyed at the end of the Transact-SQL statement batch.
Asked by J. Mini (1235 rep)
Dec 1, 2023, 09:26 PM
Last activity: Dec 3, 2023, 12:11 PM