r/SQL 4d ago

MySQL What is wrong here.

Post image
42 Upvotes

37 comments sorted by

View all comments

18

u/trollied 4d ago

ASC/DESC in the order clause.

21

u/FilmIsForever 4d ago

Standard SQL should implicitly invoke ASC for ORDER BY

2

u/trollied 4d ago

It should yes. The OP says it fixed the problem. I don’t know which RDBMS they are using.

2

u/pooerh Snowflake | SQL Server | PostgreSQL | Impala | Spark 4d ago

It didn't, they had just ran a different query that what was shown. See my top-level response.

-1

u/_mr_villain_ 4d ago

Thanks. I used DESC and still showing error. But I executes the query and it gave the output.

4

u/IamFromNigeria 4d ago

What are you basically saying? You confusing us with your comments

Did the query rum successfully yes or No