I am transferring data from one table to another table using sql script. In my parent table I have certain columns which have constants declared. I want that, instead of transferring the constant's value, their name should be transferred instead. Is it possible using sql script?
PARENT TBL
ID | NAME | COLOR_ID
2 | test | 1
I just want color_id to be changed to Green via sql script.
RECEIVING TBL
ID | NAME | COLOR
2 | test | Green
Script
Insert in receiving_tbl(id, name, color) select (id, name, color_id) from parent_tbl