Sample Header Ad - 728x90

How to run insert statement as much times as select statement gives unique values?

0 votes
2 answers
1818 views
DB Firebird. I have the following statement SELECT a.ID FROM CLIENTS a And I want my INSERT statement into another table to use each of this value, something like INSERT INTO BANKS (ID, NR, MONEY) VALUES ( gen_id(gen_name, 1), "there should be client ID from the SELECT statement above", 3000 ) Can I achieve this with one statement?
Asked by DisplayMyName (139 rep)
May 12, 2017, 10:09 AM
Last activity: May 11, 2023, 04:17 PM