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 -> selecting n number of rows from 2 tables

selecting n number of rows from 2 tables

From: Glen A. Stromquist <glenstr_at_my-deja.com>
Date: Tue, 30 Jan 2001 18:04:49 GMT
Message-ID: <956vnp$ell$1@nnrp1.deja.com>

I need to write a query that will return the last 15 rows from a 2 table join and certain criteria is met. The query is as follows:

select col1,col2,col3
from table1 a, table2 b
where b.col1=a.col1
and trunc(col3) <= (date)
and col2 in ('text values')

is there a simple way to get the last 15 rows of this query?

I am using SQL*PLUS 8.1.6 on a 7.2.3 DB, users may be using SQL*PLUS 3.3

thanks!

Sent via Deja.com
http://www.deja.com/ Received on Tue Jan 30 2001 - 12:04:49 CST

Original text of this message

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