I want to insert a range of values into my table
create TEMPORARY TABLE IF NOT EXISTS currency_numbers(
num INT
);
insert into currency_numbers(num) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
insert into pm_transaction_type (tran_type, fixed, rate, min_by_rate, max_by_rate, round, min_amount, max_amount, country_code, valid_since, valid_till, currency)
select 'fee.transfer_other_free', null, 0.1, 0, null, 0, null, null, "", null, null, currency_numbers.num
from currency_numbers
union
select 'fee.transfer_tip_free', null, 0.3, 4, null, 5, null, null, "", null, null, currency_numbers.num
from currency_numbers;
In this example, I am using the union on 2 select statements, but I want to use union with about 10. Unfortunately, I am getting the following error:
Can't reopen table: 'currency_numbers'
How can I write this query, hopefully without having to repeat either the numbers of the list of attributes names each time?