Good afternoon guys trying to run the command below by sorting it down it displays the following error missing expression SELECT * FROM tab_style WHERE nm_uf like '% MG%' and like '% BA%' order by desc; Missing expression
Good afternoon guys trying to run the command below by sorting it down it displays the following error missing expression SELECT * FROM tab_style WHERE nm_uf like '% MG%' and like '% BA%' order by desc; Missing expression
The order by
is used next to the name of the column used for sorting. Translating would be something like "order by colunax". Just put the name of the column after the command order by
that the query will work.
SELECT *
FROM tab_estado
WHERE (nm_uf like'%MG%' or nm_uf like'%BA%')
order by nm_uf desc
Either the city is Minas or it is Bahia ... The order by asks for a column.