copy paste record

[expired user #2805]'s profile image [expired user #2805] posted 17 years ago in General Permalink
is it possible to copy and paste a record in a table?
[expired user #1821]'s profile image [expired user #1821] posted 17 years ago Permalink
You mean copy a row from one table to the other?

As far as i know it's not possible with a CTRL+C - CTRL+V kinda thing.

You could however do this:

INSERT INTO table2 SELECT * FROM table1 WHERE pk=3
# or
INSERT INTO table2 (field1, field2) SELECT field1, field2 FROM table1 WHERE pk IN (6, 19)


just two examples .. i hope you understand what i mean

Please login to leave a reply, or register at first.