こういう出力が欲しい
ID Status
100 Viewed
103 Not Viewed
105 Viewed
これは私のSQLです:
select id, status from status_table where ID in (100, 101,102,103,104,105);
ステータステーブルには他のIDにエントリがないため、上記の結果が表示されます。ID is foreign key of another table named as table_file table. It contains in another database. So I cannot join the table due to some performance issue.
したがって、ファイルIDをコンマ区切りの値として渡します。しかし、私はこの種の結果が欲しいのですが、ループを使用せずにこれを作成するにはどうすればよいですか。
ID Status
100 Viewed
101 Not
102 Not
103 Viewed
104 Not
105 Viewed
出来ますか?私を助けてください。