There has to be an easy way to do this.
How can I copy a full entry in a table to a new entry just changing one field (which happens to be part of the primary key)
for example:
servers_table has app_name, server_name, ip_address, firewall fields (plus more)
I want to insert a copy of everything for server_name = TEST just with server_name = TEST2 (same entries for all the rest of the fields except server_name)
keeping in mind that the primary key is made up of app_name and server_name
I know I could do a general select of all columns, and a corresponding insert, but on subsequent tables there can be more than one entry that I want to copy so I am hoping to avoid a looping situation.
How can I copy a full entry in a table to a new entry just changing one field (which happens to be part of the primary key)
for example:
servers_table has app_name, server_name, ip_address, firewall fields (plus more)
I want to insert a copy of everything for server_name = TEST just with server_name = TEST2 (same entries for all the rest of the fields except server_name)
keeping in mind that the primary key is made up of app_name and server_name
I know I could do a general select of all columns, and a corresponding insert, but on subsequent tables there can be more than one entry that I want to copy so I am hoping to avoid a looping situation.