Is is posible to sample a database Is it possible to sample any SQL database?

By sampling I means the database table should remain and retaining the foreign key constraints.
But the actual rows from the table should be reduced.If I have 1 million records in some of my tables then in the sample database I only want any 100 records.
I am doing some analysis and processing all records takes many days.
Sure you can, you can append the SAMPLE clause to your selects:



For example:

select * from table sample(20);


sample_clause


  The sample_clause lets you instruct the database to select from a
  random sample of data from the table, rather than from the entire
  table.
  
  BLOCK
  BLOCK instructs the database to attempt to perform random block
  sampling instead of random row sampling.
  
  Block sampling is possible only during full table scans or index fast
  full scans. If a more efficient execution path exists, then Oracle
  Database does not perform block sampling. If you want to guarantee
  block sampling for a particular table or index, then use the FULL or
  INDEX_FFS hint.
  
  sample_percent
  For sample_percent, specify the percentage of the
  total row or block count to be included in the sample. The value must
  be in the range .000001 to, but not including, 100. This percentage
  indicates the probability of each row, or each cluster of rows in the
  case of block sampling, being selected as part of the sample. It does
  not mean that the database will retrieve exactly sample_percent of the
  rows of table.
  
  ...