How to show a column as NULL if it doesn't exist in match? I have a query as shown below.
In this query I am trying to get the result of orders which don't have messages (which I thought as null). But I was expecting that this query would produce a NULL in message_id if someone has an order and doesn't have a message. What should I do do reach my goal?

select *, a.message_id as x
from
  messages a
  FULL OUTER JOIN customers b ON a.customer_id = b.customer_id
  FULL OUTER JOIN orders c ON c.customer_id = b.customer_id
  FULL OUTER JOIN delivery_templates d ON c.billing_template_id = d.delivery_template_id
  FULL OUTER JOIN products e ON a.product_id = e.product_id
  FULL OUTER JOIN order_items f ON f.order_id = c.order_id    
where
  a.seller_id in (2, 3, 1, 6)
  AND
  a.message_id ISNULL
You're talking about how you display or project null when the query returns it. Remember, null is a type that represents something. It has no fixed display/rendering. For that use coalesce,

SELECT coalesce(a.message_id, 'NULL') -- or whatever you want the result is `null`


instead of 

SELECT a.message_id


null
For more information see the docs on COALESCE,


  The COALESCE function returns the first of its arguments that is not null. Null is returned only if all arguments are null. It is often used to substitute a default value for null values when data is retrieved for display.