Add "IF NOT EXISTS" statement for query.