SQL astuces

13 articles

Comment afficher plusieurs valeurs autorisées dans une même requête (sous-requêtes SELECT)

Exemple pour le module adhérent : SELECT borrowers.cardnumber AS numero_carte, borrowers.surname AS Nom, borrowers.firstname AS Prenom, borrowers.email AS email_principal, borrowers.emailpro AS email_alternatif, borrowers.dateenrolled AS date_inscription, borrowers.dateexpiry AS date_expiration, borrowers.categorycode AS categorie_pret, (SELECT description FROM categories WHERE categorycode=borrowers.categorycode) AS categorie, borrowers.sort1, […]