----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 12:45 PM
Subject: [SQL] copy a record from one table to another (archive)
> Hello there
>
> Is it possible to move a record from one table to another to do a archive
> with a simple command like move .... ?
>
begin;
insert into archive_foo (select * from foo where foo_id=1);
delete from foo where foo_id=1;
commit;
Is probably the closest you could get.
Alternatively, you could wrap the above up in a function and just go:
select do_archive_foo(1);
- Richard Huxton
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly