database - Every derived table must have its own alias error in MySQL -
i have following query:
select sum( cost ) ( select s.cost sandwiches s s.name = "cheese steak" ) union ( select p.cost pizza p type = "plain" , size = "l" )
that gives me error of:
#1248 - every derived table must have own alias
you need alias temp tables
select sum( cost ) ( ( select s.cost sandwiches s s.name = "cheese steak" ) t1 union ( select p.cost pizza p type = "plain" , size = "l" ) t2 ) t
Comments
Post a Comment