How can I select to show higher number of points

Asked

Viewed 37 times

0

Well, my question is quite simple. I intend to select a * table in my database, but I have 2 priorities.

First I want to show all the results in order where the ones with the highest value column appear first.

If this column points equals for two rows of my table, I want those with the highest value in the column DG, to appear first.

How can I do this?

Thank you.

  • SELECT * FROM TABELA ORDER BY pontos desc, dg desc have you tried this.? if it doesn’t work out, because I took the risk, posted the layout of your table, the structure?

  • 1

    Thank you very much Virgilio was just that!

  • Give him a reply to mark @Virgilionovic

  • Hi @Ricardo, look if you want to do everything well, but, I think very simple and should already have answers here for such ... Thanks rapa!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.