Skip to content

Update

IT Notes → Database → SQL @ December 22, 2020

START TRANSACTION;

UPDATE tablename
SET fieldname = value
WHERE fieldname = value;

ROLLBACK work;

COMMIT work;

If some error occurs, we can Rollback work but it needs Start transaction. Once we are sure we can commit

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x