three_sixteen
Gawd
- Joined
- Feb 15, 2002
- Messages
- 1,003
So I have a database that has 5 tables with assorted information about a computer. I was wondering what the best practice would be for updating a variable number of tables and or columns at any given time.
I have a table called computerInfo and already have the name of the computer and all of its networking info in the table.
In one scenario I want to update only the IP/Subnet/Gateway
In another scenario I may want to update the DNS servers
Right now I'm doing DELETE * FROM computerInfo WHERE (ComputerName = 'computername') and then just inserting a new row into the table. Is there maybe a better way to update the information in the row without deleting the entire row? Or is just cleaning up everything and inserting a new row maybe the best way to go about it?
I have a table called computerInfo and already have the name of the computer and all of its networking info in the table.
In one scenario I want to update only the IP/Subnet/Gateway
In another scenario I may want to update the DNS servers
Right now I'm doing DELETE * FROM computerInfo WHERE (ComputerName = 'computername') and then just inserting a new row into the table. Is there maybe a better way to update the information in the row without deleting the entire row? Or is just cleaning up everything and inserting a new row maybe the best way to go about it?