Table Hints for Locking

As mentioned previously in this chapter in the “Transaction Isolation Levels in SQL Server” section, you can set an isolation level for your connection using the SET TRANSACTION ISOLATION LEVEL command. This command sets a global isolation level for your entire session, which is useful if you want to provide a consistent isolation level for your application. However, sometimes you will want to specify different isolation levels for different queries in the system, or different isolation levels for different tables within a single query. SQL Server allows you to do this by supporting table hints in the FROM clause of SELECT, UPDATE, and DELETE statements. This allows you to override the isolation level that is currently ...

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.