0
私は以下のように、ユニオン10のテーブルで多くのクエリを実行する必要があります。私はorder0からorder9にループする効率的な方法を見つけるのに苦労していました。誰も同じような問題を解決しましたか?MySQLでUNION 10テーブルを使用するには?
select col1, col2 from order0 union all
select col1, col2 from order1 union all
select col1, col2 from order2 union all
select col1, col2 from order3 union all
select col1, col2 from order4 union all
select col1, col2 from order5 union all
select col1, col2 from order6 union all
select col1, col2 from order7 union all
select col1, col2 from order8 union all
select col1, col2 from order9;
あなたのクエリは正常です。あなたの疑問は何ですか? –
このクエリでは何を達成しようとしていますか?あなたの投稿にそれを述べてください – Beginner
あなたは間違ったデータベースデザインをしているようです。それはoder0からorder10が本当に1つのテーブルでなければならないようなにおいがします – e4c5