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: rownum

Re: rownum

From: <fitzjarrell_at_cox.net>
Date: 6 Jan 2005 08:48:13 -0800
Message-ID: <1105030093.809587.273950@z14g2000cwz.googlegroups.com>

db2group88_at_yahoo.com wrote:
> so if i want to do a insert into a new table where data is from
another
> table from row 2 to row 10, what should be right query?

insert into mynewtable
select a.col1, a.col2, a.col3, a.col4 from (select rownum rn, col1, col2, col3, col4 from mytable) a where a.rn between 2 and 10;

Substitute the proper columns from your source table (all of them) for the col1, col2, col3, col4 placeholders in BOTH queries. David Fitzjarrell Received on Thu Jan 06 2005 - 10:48:13 CST

Original text of this message

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