SQL insert syntax for complete row

J

jonefer

Using an "INSERT INTO" statment...
is there a quick syntax for adding a complete row from one table to another
(Yes, the fields are exactly the same) without having to name each field?

Also...
Using an UPDATE statement
is there a quick way to update a record with the complete contents of the
same record from another table?

These would be extremely useful for a manual synchronize that I have to write.
 
6

'69 Camaro

Hi.
Using an "INSERT INTO" statment...
is there a quick syntax for adding a complete row from one table to another

Try:

INSERT INTO tblDestination
SELECT *
FROM tblSource;
Using an UPDATE statement
is there a quick way to update a record with the complete contents of the
same record from another table?

No. You must name the individual fields and set their values.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
 
Top