I have this two tables...
subcategoria
=======================
cod_subcat, cod_cat, subcat
1, 2, União
2, 2,Pérola
3, 3, Pilão
4, 3, Capital
5, 3, Canaan
6, 1, Votorantim
12, 1, Irajázinho
11, 3, Fazenda
fornecedor_subcategoria (cod_dubcat = Primary Key)
=======================
cod_forn, cod_subcat
1, 1
1, 2
1, 3
1, 4
3, 6
3, 12
1, 5
1, 11
1, 12
There are 8 categories. I need to SELECT the 'subcat' from table 'subcategoria' WHERE 'cod_subcat' NOT IN (NOT EXIST) 'cod_forn'
How can I make this MySQL statement?
Thank you.
subcategoria
=======================
cod_subcat, cod_cat, subcat
1, 2, União
2, 2,Pérola
3, 3, Pilão
4, 3, Capital
5, 3, Canaan
6, 1, Votorantim
12, 1, Irajázinho
11, 3, Fazenda
fornecedor_subcategoria (cod_dubcat = Primary Key)
=======================
cod_forn, cod_subcat
1, 1
1, 2
1, 3
1, 4
3, 6
3, 12
1, 5
1, 11
1, 12
There are 8 categories. I need to SELECT the 'subcat' from table 'subcategoria' WHERE 'cod_subcat' NOT IN (NOT EXIST) 'cod_forn'
How can I make this MySQL statement?
Thank you.