J'ai cherché comment réaliser cela, mais je ne sais même pas comment cela s'appelle (pour le rechercher). Voici donc ce que j'ai :
Les données des tableaux sont les suivantes :
\[Products\]
ID - Name
1 - Apple
2 - Banana
\[Storehouses\]
ID - Name
1 - General
2 - Other
\[Stocks\]
Product - Storehouse - Stock
1 - 1 - 4
1 - 2 - 4
2 - 1 - 5
Here I want get all the products on 'Storehouse' = '2'
but if not exists return 'null' or '0' And what I pretend to get is:
\[SELECT\]
Product - Stock
1 - 4
2 - null OR '0'
Je ne sais pas quelle déclaration utiliser, il me faut donc au moins un indice. Merci.