Currently there's some data that was entered incorrectly and I basically need to run a schema which updates the current record and inserts a new one (in one statement if possible). The table is set up as so:
cityID int(10)
stateID smallint(5)
orderEnterpriseID int(10)
isDefault tinyint(3)
locationType tinying(2)
Right now, every record has a locationType of 0 and I need to update it to 5:
UPDATE
tableSET
table.locationType= 5 WHEREtable.locationType= 0 ANDtable.orderFromEnterprise= 0;
But I also need to create another record with duplicate data and set the locationType to 6. I have issues wrapping my head around some of these SQL statements and any help is greatly appreciated!!!!