List:General Discussion« Previous MessageNext Message »
From:Waynn Lue Date:December 6 2008 10:08pm
Subject:Re: --safe-updates and DELETEs
View as plain text  
>
>  If I have a table like this:
>> CREATE TABLE `Test` (
>>  `TestId` bigint(20) default NULL
>> ) ENGINE=MyISAM DEFAULT CHARSET=latin1
>>
>> 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:
>>
>
>
>
> http://dev.mysql.com/doc/refman/5.0/en/mysql-command-options.html#option_mysql_safe-updates
>

Yeah, that's the documentation I was looking at for my question.  It says

"You are not allowed to execute an
UPDATE<http://dev.mysql.com/doc/refman/5.0/en/update.html>or
DELETE <http://dev.mysql.com/doc/refman/5.0/en/delete.html> statement unless
you specify a key constraint in the WHERE clause or provide a LIMIT clause
(or both)."

Since there's no key on this table, does that mean it's impossible unless I
turn it off?

Thanks for any help!

Waynn

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