I want to create a view from the following two tables:
Entry:
entry_id
entry_date
entry_amount
user_id
Forecast:
forecast_id
forecast_date
forecast_amount
user_id
Now I want to have a view which combines each entry with its forecast (same user_id and same date). This is fine, but I have a problem with those rows, which have a forecast and no entry, or vice versa.
I would like to still have all entries with no forecasts as well in the database. They should show up with a null values in the forecast fields. And the same for forecasts without entries.
This (FULL OUTER JOIN) command is not available on MySql you will need to use UNION to achieve this as given below