Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP RLock() in T-SQL ?
Message
 
 
To
18/05/2005 10:43:08
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01015009
Message ID:
01016042
Views:
10
>
>SQL Server performs table, page, and row-level locking automatically:
>
>
>
>declare @Next int
>
>begin transaction
>    select @Next = invoice + 1 from DocsNumbers
>    update DocsNumbers
>        set invoice = @Next
>end transaction
>
>
>For more info about SQL locking, see "SET TRANSACTION ISOLATION LEVEL" in the BOL.

You don't need a transaction because it can be done in one UPDATE sytement. See Record ID generator question Message #611104
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform