Modify the MYSQL statement. thank you ~ Select * from (select * fromcitywherenameslike % xxx % limit10) wherenameslike $ xxx % orderbynames error message: how to change Everyderivedtablemusthaveitsownalias? -- Modify the MYSQL statement. thank you ~
Select * from (select * from city where names like '% xxx %' limit 10) where names like '$ xxx %' order by names
Error message: Every derived table must have its own alias
How should I change it?
------ Solution --------------------
Select * from (select * from city where names like '% xxx %' limit 10) where names like '$ xxx %' order by names
Analysis:
Select * from (table) is a table.
Select * from city where names like '% xxx %' limit 10 this obviously does not match, the difference is far away
So your sentence is obviously wrong.
------ Solution --------------------
I didn't go to verify (). can I put limit in it? but according to the error message, it should mean this.
Select * from (select * from city where names like '% xxx %' limit 10) t where names like '$ xxx %' order by names
------ Solution --------------------
Discussion
I didn't go to verify (). can I put limit in it? but according to the error message, it should mean this.
Select * from (select * from city where names like '% xxx %' limit 10) t where names like '$ xxx %' order by names