Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting Records
Message
 
To
27/08/2002 13:10:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00694122
Message ID:
00694128
Views:
12
>What happens if I try to delete many records and the database engine discovers, while deleting, that a record is locked by a user? For example, a table contains many thousands of records and 1000 of them meet a certain condition. I want to delete those records so I issue the command DELETE FOR that condition. After having deleted 800 of those 1000 records, the database engine encounters a record that is locked by a user. Does it automatically RECALL the 800 deleted records or do they remain deleted even though the command could not be completed successfully?



AFAIK, DELETE for many records locks entire table. So, it will attempt to lock the table first, and if at least one record locked by another user, it will fail to continue.
DELETE - SQL works differently. It locks current record only. So in case you are trying to /delete from table where.../, it will delete records until meet the record locked by another user and then failed to continue.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform