4 messages in com.mysql.lists.mysqlRe: A "current row updating" counter ...
FromSent OnAttachments
adm...@azzer.com09 Feb 2004 17:36 
emie...@micron.com10 Feb 2004 07:19 
adm...@azzer.com10 Feb 2004 07:36 
Don Read10 Feb 2004 10:17 
Subject:Re: A "current row updating" counter for a mass "Update" or similar?
From:adm...@azzer.com (adm@azzer.com)
Date:02/10/2004 07:36:25 AM
List:com.mysql.lists.mysql

Ah that's sheer genius!

Thanks muchly, I never figured in to being able to use SQL with it's own "variables" so to speak - I'm sure I'll find more than one use for this new ability!

Much appreciated Ed :)

----- Original Message ----- From: <emie@micron.com> To: <adm@azzer.com>; <mys@lists.mysql.com> Sent: Tuesday, February 10, 2004 3:19 PM Subject: RE: A "current row updating" counter for a mass "Update" or similar?

Sure, try this. I'm using 4.1.2 in case it matters.

set @n=0; UPDATE Ranks_table SET Rank= (select @n:=@n+1) ORDER BY Score DESC;