List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:December 6 2008 7:54pm
Subject:Re: --safe-updates and DELETEs
View as plain text  

> If I have a table like this:
>  `TestId` bigint(20) default NULL
> Does using --safe-updates mean that it's impossible for me to ever delete
> from it, since it doesn't have a key?  For example:

> INSERT INTO Test VALUES (1), (2);
> mysql> DELETE FROM Test WHERE TestId = 1;
> ERROR 1175 (HY000): You are using safe update mode and you tried to update 
> a
> table without a WHERE that uses a KEY column

With regards,

Martijn Tonies
Upscene Productions

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum: 

--safe-updates and DELETEsWaynn Lue6 Dec
  • Re: --safe-updates and DELETEsMartijn Tonies6 Dec
    • Re: --safe-updates and DELETEsWaynn Lue6 Dec