April 27, 2009 at 1:09 am
Can we get more than 1 column from an subquery
April 27, 2009 at 2:00 am
if you select from a subquery. i think its the same thing anyway.
select
x.col1,
x.col2
from
(select col1,col2 from table1)x
there's no real need to have more than one column if its an "IN ()" structure.
April 27, 2009 at 3:40 am
You can have more than one columns IF the subquery is used in the FROM Clause.
But NOT if used in Select List (column list), Where conditions and Having conditions. Only one column value can be returned.
You can concatenate the values of two or more columns into one (if required...)
April 27, 2009 at 5:03 am
Thanx davidandrews13
🙂
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply