データベースに異なるテーブルがあります。次のようなすべてのテーブルを処理する単一のクエリを作成したいと思います。
comm.CommandText = "Select * from table1 where UserId='" + 1 + "'";
comm.CommandText = "Select * from table2 where UserId='" + 1 + "'";
同じクエリですが、テーブル名が異なります。
1 つのクエリで両方のクエリを作成する方法はありますか?
ありがとう。