I have a question about how to ask a question to the database.
Suppose I have two tables with slightly different structures
Table1
id tipoA data
0 A '21/12/14'
Table2
id tipoB data
1 B '24/12/14'
Result
id tipoA tipoB data
0 A B '21/12/14'
1 A B '24/12/14'
Expected
id tipoA tipoB data
0 A 0 '21/12/14'
1 0 B '24/12/14'
I simply want that if the field does not exist to not fill it out or put a 0 or ''
I did:
SELECT * FROM tabela1, tabela2;
but this command does not return the expected result. How should I do?