Do computation in select statement using a current row column
Posted on 2009-04-01
I am writing SQL and need to write a query which returns, not only columns, but a computation on a column using the value of another column in the row.
so far I have:
query1 -> "select a, b, c, d from table1 where f = 1"
I want to do add another column to query1 (say ..e) which is the result of a select on another table where I use column 'a' from query1.
How can I accomplish this?