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
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_
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