sql - Pick up data from union of two tables -


i merged 2 databases union following that:

select model,price  pc  union  select model,price laptop 

it's working when use select statement pick data. not working. here code

select model (  select model,price           pc       union       select model,price      laptop     ) 

error happens @ last operator ")". don't know why errors , how solve

you have set alias name select

try this

select model ( select model,price         pc         union         select model,price        laptop      ) t 

or:

with tbl    (    select model,price         pc         union         select model,price        laptop   ) select model tbl; 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -