MySQL Forums
Forum List  »  French

Re: tri sur deux colonnes
Posted by: Jean Molliné
Date: June 22, 2015 11:40AM

Bonsoir,
ça peut se faire de la maière suivante :

SELECT
  nom,
  detail,
  prix_brut,
  promo
FROM nom_de_la_table
ORDER BY IF(promo IS NULL, prix_brut, promo);

______________________________________________________________
Une question bien formulée, c'est un problème bien compris : ça représente déjà les 3/4 de la réponse ;)

Options: Reply• Quote


Subject
Views
Written By
Posted
2588
June 22, 2015 04:40AM
Re: tri sur deux colonnes
1492
June 22, 2015 11:40AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.