Update a table with data from another existing table:
UPDATE tableToBeUpdated
SET fldToBeUpdate = (SELECT tblSource.fldToUpdate FROM tblSource WHERE tblSource.idOrder = tableToBeUpdated.idOrder)
WHERE EXISTS (SELECT tblSource.fldToUpdate FROM tblSource WHERE tblSource.idOrder = tableToBeUpdated.idOrder)
Thursday, February 4, 2010
Tuesday, January 26, 2010
Create a new table with same schema and data from an existing table
Create a new table with same schema and data from an existing table
SELECT * INTO NEWtABLEnAME FROM FROMtABLEnAME
SELECT * INTO NEWtABLEnAME FROM FROMtABLEnAME
Subscribe to:
Comments (Atom)