Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: DELETE based on ROWID

Re: DELETE based on ROWID

From: Mark Gumbs <mgumbs_at_hotmail.com>
Date: Wed, 29 Sep 1999 12:00:56 +0100
Message-ID: <37f1eeca.0@145.227.194.253>


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



AAAAsEAACAAAAUmAAA
AAAAsEAACAAAAUmAAB

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US