Re: Update optimization...

2004-12-03 Thread Gleb Paharenko
Hello. Did you read all promptings at: http://dev.mysql.com/doc/mysql/en/Full_table.html "Manish" <[EMAIL PROTECTED]> wrote: > I am trying to execute this query and it is failing with Table is full error > (I know I can make temp tables big). > update t1, t2 > set t1.XXX=1 > where t

Re: Update optimization?

2003-11-20 Thread Stephen Brownlow
UPDATE some_table SET some_field=IF(id = some_id,1,0) Have fun, Stephen - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 21, 2003 11:41 AM Subject: Update optimization? Hello guys, Let say: UPDATE some_table SET some_field=1 WHERE id = some_

Re: UPDATE optimization?

2003-11-20 Thread Matt W
Hi, You can combine those 2 UPDATEs like this: UPDATE some_table SET some_field=IF(id=some_id, 1, 0); Or, the standard SQL syntax: UPDATE some_table SET some_field=CASE id WHEN some_id THEN 1 ELSE 0 END; Hope that helps. Matt - Original Message - From: <[EMAIL PROTECTED]> Sent