Last updated on FEBRUARY 27, 2012
The SAMPLE parameter can prove very useful when e.g. a test database needs to be created which uses a subset of production data, and the amount of data in the production database is too large to handle. Smaller amounts of data make it easier to manage the testing, and this parameter allows extraction of a given percentage of the data from the tables.
The syntax of the command line parameter is:
- schema_name is referring to the owner of the table to be sampled
- table_name is the table to be sampled
- sample_percent is the percentage to be extracted from the table
Note: if you specify schema_name, then table_name is also mandatory.
The sample_percent has no default value, so when used, a sample percentage must always be provided. It can range from from .000001 up to, but not including, 100.
Note: the sample_percent merely indicates the probability that a row will be selected as part of the sample. It does not mean that the database will retrieve exactly that amount of rows from the table.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms