473,378 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Want to Pull "x" number of records.

Hi. I'm working in Oracle SQL and i want to view the details on just 20 random records from a table. What's the proper syntax for this?
Apr 4 '07 #1
1 1413
Saii
145 Expert 100+
See if this helps

SELECT *
FROM (SELECT *
FROM <table_name>
ORDER BY DBMS_RANDOM.random ())
WHERE ROWNUM <= 20;
Apr 4 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: campwes | last post by:
I've searched the forums, but haven't come up with a way to do this. This is what I want to do: 1. Pull records from an Oracle database into a datagrid on a winform. 2. Select one of those...
2
by: Ellen Manning | last post by:
Using A2K. In my table I have the field "Grant" which can have a value or be null. I have a query that counts the number of records and has a Where clause on the Grant field. The query won't...
1
by: PMBragg | last post by:
ORINGINAL Post >Thank you in advance. I'm trying to pull all inventory items from December >of the previous year back to 4 years for my accountant. I know this can be >done, but I'm drawing a...
2
by: Tom | last post by:
I'm getting this error when I try to pass a structure to a dll. An unhandled exception of type 'System.ArgumentException' occured in Test1.exe Additional Information: Type could not be marshaled...
3
by: mike | last post by:
I added a linked server successfully; but the only tables accessible are only the system tables! I do have all the rights on both servers (Windows & SQL server). All the non system tables are...
1
by: skbhagour | last post by:
hi all i am using given below procedure what i want (i am using sql server2000 with vb.net in window advanceserver2000) 1.i want records between two given date for particular account...
5
by: binky | last post by:
Question for all you SQL gurus out there. I have a (seemingly) complex query to write, and since I'm just learning SQL server, am not sure how to go about it. Tables: t_trans t_account All...
13
Hiren Joshi
by: Hiren Joshi | last post by:
Hi All, VB 6.0 and MS Access While Saving Record, I want Number to be Generated in following Format 140208-001, 140208-002, 140208-003 . . . etc... You must have noticed that 140208 is...
0
by: nntp.charter.net | last post by:
Okay...here is what I need to do. I have an Oracle Connection that I want to pull records from into an SQL table. I have a view in the SQL server that contain the values I want to use in a where...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.