Try Catch with Transaction
Try Catch in SQL with Transaction. Sources: https://docs.microsoft.com/en-us/sql/t-sql/functions/error-message-transact-sql?view=sql-server-2017
Try Catch in SQL with Transaction. Sources: https://docs.microsoft.com/en-us/sql/t-sql/functions/error-message-transact-sql?view=sql-server-2017
The default behavior in SQL Server is for every query to acquire its own shared lock prior to reading data from a given table. This behavior ensures that you are only reading committed data. However, the NOLOCK table hint allows you to instruct the query optimizer to read a given table without obtaining an exclusive... » read more
By using SELECT … INTO, you don’t have to define the columns of the temporary table. The temporary table columns will be based on the SELECT columns.
Example: Source: https://docs.microsoft.com/en-us/sql/t-sql/functions/round-transact-sql?view=sql-server-2017
SQL Server 2005 introduced the APPLY operator. SQL Server APPLY operator has two variants; CROSS APPLY and OUTER APPLY The CROSS APPLY operator returns only those rows from the left table expression (in its final output) if it matches with the right table expression. In other words, the right table expression returns rows for the... » read more