Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
データベースにクエリを実行する必要があるレコードが多数あります。大量のデータ セットを使用して、すべての結果セットを一度に一覧表示できるクエリを作成するにはどうすればよいですか?
SQL Server 2008 で使用したデータベース
同じ結果セットで複数の選択を取得しますか? もしそうなら、あなたはすることができます
select column1, column2, column3 from table1 UNION ALL select column1, column2, column3 from table2
必要な回数だけ結合できますが、もちろん、両方の選択で列を一致させる必要があります。UNION のみを使用すると、重複する行が削除されます。