結果 : sql check constraint based on another table