Locking a table prevents two users to update a table at same time.
Using locks we can prevent data replications.
LOCK TABLE employees IN EXCLUSIVE MODE;
This exclusive mode enables the user to look into the rows but can update it.
And this command for remote link tables.
LOCK TABLE employees@DB
IN SHARE MODE
The alternative for this is to use sequence in your table.It will also prevent data duplications.
No comments:
Post a Comment
Thanks for your comments submitted.,will review and Post soon! by admin.