Home » RDBMS Server » Server Administration » Re: imp
Re: imp [message #370792] Tue, 08 February 2000 20:47 Go to next message
Paul
Messages: 164
Registered: April 1999
Senior Member
Fus,
If you are not particular about which 3 records you return, this will do the trick:
SELECT whatever_columns_you_want
FROM your_table
WHERE ROWNUM Regards,
Paul
Re: Imp [message #370795 is a reply to message #370792] Wed, 09 February 2000 00:46 Go to previous messageGo to next message
Atavur Rahaman S.A
Messages: 23
Registered: January 2000
Junior Member
Hello Fus,
It's true that if you don't know which records you want to display..It's very difficult to solve. But if you know that, this much of records that you want to display then...either you can proceed with ROWID or ROWNUM.

Ex1) Select * from
Where
Rownum Ex2) You can use ROWID where you have to convert it to Decimal using HEXTODEC function.

Sometimes it's difficult with a query like ...

"To find out the middle record....If there are 10 records in a table then it may be 5th record/6th record......Assume that there are 30,000 records then the query is........

SELECT * from
where ROWID=( Select
Max(ROWID) From
Where Rownum <=
))

Regards

Atavur Rahaman S.A
Re: Imp [message #370801 is a reply to message #370792] Wed, 09 February 2000 13:33 Go to previous message
fus
Messages: 1
Registered: February 2000
Junior Member
Thanx paul and Atavur. It will help.

Regards,

FARHAN
Previous Topic: How is SQL statement run faster the second time ?
Next Topic: spatial and pl/sql
Goto Forum:
  


Current Time: Fri Oct 30 03:34:04 CDT 2020