Forum Moderators: open
Trying to insert records into a new table but also insert a value which does not exist in the old table
This simple example works fine, but i can’t see how i could insert values which don’t come from the oldTable
INSERT INTO newTable (field1,field3,field4)
SELECT field1, field3, field4
FROM oldTable;
newTable has an extra field called newID which i would like to populate at the same time.
Something like this:
INSERT INTO newTable (field1,field3,field4, $newID)
SELECT field1, field3, field4
FROM oldTable;
Any ideas?
Thanks