MySQL Forums
Forum List  »  Newbie

how to use alias variable for calculation in select clause
Posted by: Nagendran S
Date: August 04, 2009 04:04AM

hai friends,

i'm having a problem in the following process
pls anyone help me.

i'm having a table name A.
in that 3 fields.
1. itm_code 2. itm_rate 3. itm_qty;

i have to write a query which should multiple the rate and qty using alias variable

select itm_code as ic,itm_rate as ir,itm_qty as iq, ir*iq from A;

in this i cant able to multiple the values using their alias name...
pls anyone help me

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.