Hi,
SELECT @RES=data*2 AS intermediate_result,
@RES + 1 AS final_result
FROM table;
can do the trick.
Why not your method ? because it's v4.1
Mathias
Selon Tom Cunningham <[EMAIL PROTECTED]>:
> Here's something I've been curious about:
>
> Referring to one field from another
Here's something I've been curious about:
Referring to one field from another field in a 'select' query:
SELECT data*2 AS intermediate_result,
intermediate_result + 1 AS final_result
FROM table;
I know that MySql 4.1 can't handle it, but:
(a) Is it part of standard SQL? (I hav