Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL insert syntax for complete row

0 views
Skip to first unread message

jonefer

unread,
Apr 24, 2006, 4:55:02 PM4/24/06
to
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.

'69 Camaro

unread,
Apr 24, 2006, 5:36:02 PM4/24/06
to
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.

0 new messages