Collections:
Compilation Error in a Statement Batch in SQL Server
What happens to a Transact-SQL statement batch if there is a compilation error?
✍: FYIcenter.com
If a Transact-SQL statement batch has multiple statements, and one of them has compilation error, none of the statements in the batch will be executed. The tutorial exercise below gives you some good examples:
SELECT getdate(); SELECT getdates(); SELECT getdate(); ---------------------------- Msg 195, Level 15, State 10, Line 2 'getdates' is not a recognized built-in function name.
As you can see, the compilation error on the second statement stops the execution of all statements.
⇒ SQL Server Transact-SQL Language References
⇐ Statement Batch in SQL Server Transact-SQL
2017-05-29, 2595🔥, 0💬
Popular Posts:
How To Download Oracle Database 10g XE in Oracle? If you want to download a copy of Oracle Database ...
What Is an Oracle Tablespace in Oracle? An Oracle tablespace is a big unit of logical storage in an ...
How To Select All Columns of All Rows from a Table with a SELECT statement in SQL Server? The simple...
What Is a Parameter File in Oracle? A parameter file is a file that contains a list of initializatio...
Can Date and Time Values Be Converted into Integers in SQL Server Transact-SQL? Can date and time va...