Last answered:

29 Mar 2020

Posted on:

29 Mar 2020

0

SQL DELETE Statement

The following error arises:   09:31:24 delete from departments_dup where dept_no = 'd003' Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 0.000 sec
1 answers ( 0 marked as helpful)
Instructor
Posted on:

29 Mar 2020

0
Hi Nabin! Thanks for reaching out. To solve this problem, you need to follow the steps as suggested by Workbench. Here they are in more detail.
  1. Go to the main Menu and expand the Edit/Preferences.../SQL Editor  option.
  2. Scroll down and un-tick the Safe Updates mode.
3. Click "OK" to confirm. 4. Reconnect to the database by clicking the following icon from the centre of the screen. 5. Load the data from the employees.sql file once more. Execute the following command to set employees as a default database.
USE employees;
6. Retry executing your query. Hope this helps.
Best,
Martin

Submit an answer