May 31, 2023
SQL Creating SQL
I needed to update a relational database table’s values from another database table referencing each other and came out with an interesting way to solve this.
The ideas is to generate other SQL as text as output, in my case a series of update statements.
I guess an example could help to explain the whole thing better.
We have 2 tables:
CREATE TABLE FIRST (ID INT, COL1 VARCHAR); And
Read more