|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: A "current row updating" counter for a mass "Update" or similar?
admin
azzer.com
Date: Tue Feb 10 2004 - 09:36:47 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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: <emierzwa
micron.com>
To: <admin
azzer.com>; <mysql
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;
Ed
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]