How can you make UPDATE and DELETE safer?

SQL changing data safely · Freshers

Model answer

Run the same condition in a SELECT first and check the row count, wrap the change in a transaction so you can roll back, take a backup for big changes, and use least-privilege accounts. Some tools can block UPDATE or DELETE without WHERE.

Learn this topic

INSERT, UPDATE and DELETE: Change Data Safely in the course SQL for Beginners: Learn Databases Step by Step.

Sign in to add your own answer.

More questions