I'm doing a left outer join on two tables, A and B, and trying to get one value from B and rename it as the id of its previous column. So it looks like this:
SELECT A.*, B.value AS B.id FROM A LEFT OUTER JOIN B ON ...
AS B.id does not work. I've tried a couple of variants and searched Google and SO but can't find it. Is there a way to do this?
EDIT: I'm sorry, I should have mentioned that the table I was trying to join was always a one row table. When I joined a one row table, I wanted to use the id of that only row as an identifier. I was planning on joining each row separately, and having their values be under columns identified by their previous id. I got the answer I wanted though. It looks like what I wanted to do is impossible (and was a bad approach anyway), and my solution was really just to take a different approach.