sql: choose given schema if mismatch exists