mysql - Select from multiple tables with UNION -
i've trying select records 3 tables in 1 database union
i've got error:
#1248
- every derived table must have own alias
this query i'm trying:
select * (select column1, 'table1' table1 union select column1, 'table2' table2 union select column1, 'table3' table3) column1 not 'abr%' , length(column1) < 8;
what mean error , how can fix , show proper results?
you need give derived table alias says:
select * (select column1, 'table1' table1 union select column1, 'table2' table2 union select column1, 'table3' table3) dtalias column1 not 'abr%' , length(column1) < 8;
Comments
Post a Comment