MySQL Forums
Forum List  »  General

Multiply same column being fetched in two similar select statements
Posted by: Rajarshi Roy
Date: February 21, 2014 02:36AM

I need to multiply the integer values in a column being fetched using two different select statements on one table.Can I do this using a select statement only?

As for example,I am doing :

select value from test_table where config_id = 2 order by test_id; (test_id being surrogate key, auto-incremented)

AND

select value from test_table where config_id = 4;

Now I want to do an opertation that will multiply the value field row-wise.

Can someone help me with this?

Options: ReplyQuote


Subject
Written By
Posted
Multiply same column being fetched in two similar select statements
February 21, 2014 02:36AM


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.