What is the use of ‘i_am_a_dummy flag’ in MySQL?

In MySQL, there is falg “ia_am_a_dummy” that can be used to save beginner developers from erroneous query like ‘DELETE FROM table_name’. If we run this query it will delete all the data from table names table_name.

With ‘i_am_a_dummy flag’, MySQL will not permit running such a query. It will prompt user to create a query with WHERE clause so that only specific data is deleted.

We can achieve similar functionality with ‘safe_updates’ option in MySQL.

This flag also works on UPDATE statement to restrict updates on a table without WHERE clause.

Leave a Reply

Your email address will not be published. Required fields are marked *