This is something that you can verify by using the transaction DMVs. For example, if I kick off a long running SELECT
query then the following query will return at least one row:
SELECT *
FROM sys.dm_tran_active_transactions t
WHERE name = N'SELECT';
Example result set:
You can use the same method for DDL statements, but it's worth considering what should happen if an ALTER TABLE
fails before completion. You'd want the table to be restored to the original state, right? Otherwise your database will be corrupt. A transaction is the mechanism that allows for the statement to be rolled back. You will have a transaction with log records any time a statement modifies data in your database in order to avoid database corruption. So yes, DDL statements must use transactions.