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: ReplyQuote


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


Sorry, you can't reply to this topic. It has been closed.

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.