Results 1 to 4 of 4
-
05-10-2003, 10:05 PM #1Disabled
- Join Date
- Aug 2002
- Posts
- 1,216
Moving a row from table A to Table B?
Is there a easy way to move a row from Table A to Table B in mysql/php.
Thanks!
-
05-10-2003, 11:22 PM #2Junior Guru
- Join Date
- Jun 2002
- Posts
- 234
SQL:
INSERT INTO tableA SELECT * FROM tableB WHERE id = 1;
DELETE FROM tableB WHERE id = 1;
-
05-11-2003, 03:58 AM #3Web Hosting Master
- Join Date
- May 2002
- Posts
- 638
is it possible to to copy a record in the same table? for eg. if i want to duplicate a record in the same table.
i.e. insert into tableA select * from tableA where id = 1;
is the above code correct?
-
05-11-2003, 01:16 PM #4Aspiring Evangelist
- Join Date
- Dec 2002
- Location
- Fort Worth
- Posts
- 434
Originally posted by lobaloba9
is it possible to to copy a record in the same table? for eg. if i want to duplicate a record in the same table.
i.e. insert into tableA select * from tableA where id = 1;
is the above code correct?