123k views
1 vote
what type of clause must you always use with DEKETE or UPDATE to avoid inadvertently changing data elsewhere in the database​

1 Answer

2 votes

While you’re using the DELETE or UPDATE to change the data in any database like MySQL or ORACLE, the WHERE clause can be used to avoid inadvertently changing data everywhere.

Step-by-step explanation:

The WHERE clause checks the condition and the changes mentioned by the DELETE or UPDATE command will be done if the condition is true. There are also other clauses like HAVING, IN which will have range either inclusive or exclusive.

It is also noted that in MySQL, there is a method called WorkBench which enables safe mode and doesn’t execute statements without the WHERE clause.

User Deepak N
by
7.9k points