I'd like to know if I'm able to use a CTE inside a transaction block like so:
WITH CTE .....
Any insight will be appreciated.
Attachments: Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.
yes you can use a CTE within a transaction, the only point I would make is that you need to inlcude the ';' statement terminator
;WITH CTE .....
Yes, there's absolutely no reason why not. You may need to make sure the statement before the cte is terminated with a semicolon, but that's about all...
No one has followed this question yet.
Locking the rows selected in transaction
Filter Long Running Transaction