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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: help with query :)

RE: help with query :)

From: Jane Gao <JGao_at_kalgold.com.au>
Date: Wed, 31 May 2000 14:38:57 +0800
Message-Id: <10513.107210@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01BFCACA.E5FAD00C
Content-Type: text/plain

Try this query:

select * from yourtable minus
(select * from yourtable where rownum <= (select count(*) - 5 from yourtable));

Hope it helps

Jane Gao
Senior Application Support Analyst
Kalgoorlie Consolidated Gold Mines



> * Phone : (08) 9022 1129
*Fax		:  (08) 9022 1119

> *Address : PMB 27
KALGOORLIE WA 6430
> *E-mail : jgao_at_kalgold.com.au
>
>
> -----Original Message-----
> From: Yohans Mendoza [SMTP:yohans_at_demiurge.sirius-images.net]
> Sent: Wed, 31 May 2000 08:25
> To: Multiple recipients of list ORACLE-L
> Subject: help with query :)
>
> hi all,
>
> hope you're ok
> I have this "silly" question. Is there an easy way to retrieve the last 10
> records that have been entered in a given table?
>
> TIA
>
> --Yohans
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~
> Yohans Mendoza System Analyst
> yohans_at_sirius-images.com Sirius Images Inc.
> http://www.sirius-images.net/users/yohans http://www.sirius-images.com
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~
>
> --
> Author: Yohans Mendoza
> INET: yohans_at_demiurge.sirius-images.net
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

------_=_NextPart_001_01BFCACA.E5FAD00C
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2448.0">
<TITLE>RE: help with query :)</TITLE>
</HEAD>
<BODY>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Try this = query:</FONT>
</P>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">select * from = yourtable minus </FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">(select * from = yourtable where rownum &lt;=3D (select count(*) - 5 from = yourtable));</FONT>
</P>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Hope it helps =
</FONT>
</P>

<P><B><FONT SIZE=3D2 FACE=3D"Tahoma">Jane Gao</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Tahoma">Senior Application Support =
Analyst</FONT></B>
<BR><B><FONT SIZE=3D2 FACE=3D"Tahoma">Kalgoorlie Consolidated Gold =
Mines</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------=
------------------</FONT></B>

<BR><FONT COLOR=3D"#000080" FACE=3D"Wingdings">(</FONT><B></B><B><FONT = SIZE=3D2 FACE=3D"Arial"> Phone :&nbsp; (08) 9022 1129</FONT></B> <BR><FONT COLOR=3D"#008000" FACE=3D"Wingdings">.</FONT><B></B><B><FONT = SIZE=3D2 FACE=3D"Arial">Fax&nbsp;&nbsp;&nbsp; = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp; (08) 9022 = 1119</FONT></B>
<BR><FONT COLOR=3D"#FF0000" FACE=3D"Wingdings">+</FONT><B></B><B><FONT = SIZE=3D2 =
FACE=3D"Arial">Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = :&nbsp; PMB 27</FONT></B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 = FACE=3D"Arial">&nbsp;&nbsp;&nbsp; KALGOORLIE&nbsp; WA&nbsp; = 6430</FONT></B>
<BR><FONT COLOR=3D"#0000FF" FACE=3D"Wingdings">*</FONT><B></B><B><FONT = SIZE=3D2 FACE=3D"Arial">E-mail :&nbsp; jgao_at_kalgold.com.au </FONT></B>
</P>
<BR>
<UL>
<P><FONT SIZE=3D1 FACE=3D"Arial">-----Original Message-----</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"Arial">From:&nbsp;&nbsp;</FONT></B> <FONT =
SIZE=3D1 FACE=3D"Arial">Yohans Mendoza = [SMTP:yohans_at_demiurge.sirius-images.net]</FONT> <BR><B><FONT SIZE=3D1 FACE=3D"Arial">Sent:&nbsp;&nbsp;</FONT></B> <FONT = SIZE=3D1 FACE=3D"Arial">Wed, 31 May 2000 08:25</FONT> <BR><B><FONT SIZE=3D1 =
FACE=3D"Arial">To:&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 = FACE=3D"Arial">Multiple recipients of list ORACLE-L</FONT> <BR><B><FONT SIZE=3D1 =
FACE=3D"Arial">Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>= </B> <FONT SIZE=3D1 FACE=3D"Arial">help with query :)</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">hi all,</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">hope you're ok</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">I have this &quot;silly&quot; = question. Is there an easy way to retrieve the last 10</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">records that have been entered in a = given table?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">TIA</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">--Yohans</FONT> <BR><FONT SIZE=3D2 =

FACE=3D"Arial">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~~~~~~~~~~~~~~~~~~~~~</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Yohans Mendoza&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System Analyst</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">yohans_at_sirius-images.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sirius Images = Inc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"><A =
HREF=3D"http://www.sirius-images.net/users/yohans" = TARGET=3D"_blank">http://www.sirius-images.net/users/yohans</A>&nbsp;&nb= sp;&nbsp; &nbsp;&nbsp; <A HREF=3D"http://www.sirius-images.com" = TARGET=3D"_blank">http://www.sirius-images.com</A> </FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~~~~~~~~~~~~~~~~~~~~~</FONT>

</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">-- </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Author: Yohans Mendoza</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; INET: =
yohans_at_demiurge.sirius-images.net</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Fat City Network = Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX: (858) = 538-5051</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">San Diego, = California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">---------------------------------------------------------=
-----------</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">To REMOVE yourself from this mailing = list, send an E-Mail message</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">to: ListGuru_at_fatcity.com (note EXACT = spelling of 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">the message BODY, include a line = containing: UNSUB ORACLE-L</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">(or the name of mailing list you want = to be removed from).&nbsp; You may</FONT> Received on Wed May 31 2000 - 01:38:57 CDT

Original text of this message

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