visit : https://zonixsoft.com (our official website)
INSERT offers the ability to insert into a table based upon a SELECT statement with the following syntax:
INSERT INTO [TABLEA] ([FIELDA],[FIELDB],[FIELDC])
SELECT [FIELDA],[FIELDB],[FIELDC]
FROM [TABLEB]
there are time where you may want to do a similar approach with UPDATE.
Here is the syntax to do that very task:
UPDATE [TABLEA]
SET [TABLEA].[FIELDA] = [TABLEB].[FIELDA]
[TABLEA].[FIELDB] = [TABLEB].[FIELDB]
[TABLEA].[FIELDC] = [TABLEB].[FIELDC]
FROM [TABLEA]
JOIN [TABLEB]
ON [TABLEA].[KEYA] = [TABLEB].[KEYA]
Thank you very much for this useful information.
Please keep on blogging.
I am looking forward to read your next great article. web design London
Best regards!!!
Sam