Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: DELETE based on ROWID
It works ok when i try it (or prehaps i missed something)
SQL> create table foo (test varchar2(10));
Table created.
SQL> insert into foo values ('123');
1 row created.
SQL> insert into foo values ('456');
1 row created.
SQL> commit;
Commit complete.
SQL> create table foo2 (rowid_col varchar2(20));
Table created.
SQL> insert into foo2 select rowid from foo;
2 rows created.
SQL> commit;
Commit complete.
SQL> select * from foo2;
ROWID_COL
SQL> delete from foo where rowid in (select rowid_col from foo2);
2 rows deleted.
<marc_shewring_at_email.mobil.com> wrote in message
news:7ssnrb$p1o$1_at_nnrp1.deja.com...
>
>
> G'day,
>
> I wish to delete from a table using a list of rowid's stored in another
> table.
>
> Can someone give me some pointers on this as whenever i do something
> like:
>
> delete from surf where rowid in (select surf_rowid from
> surf_rows_to_delete);
>
> I get a strange ora-01578 msg as the db is fit and healthy.
>
> cheers
>
> Marc
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Sep 29 1999 - 06:00:56 CDT
![]() |
![]() |