-- SIMPLE UPDATE QUERY FROM TABLE A TO B
UPDATE TABLEA
SET TABLEA.[NAME] = TABLEB.[NAME]
FROM TABLEB
WHERE TABLEB.ID = TABLEA.ID
-- USING JOINS
UPDATE TABLEA
SET TABLEA.[NAME] = TABLEB.[NAME]
FROM TABLEB
INNER JOIN TABLEC
ON TABLEC.FIELD1 = TABLEB.FIELD1
WHERE TABLEB.ID = TABLEA.ID
Wednesday, April 1, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment