Oracle SAMPLE Clause
Oracle SAMPLE Clause is a SQL statement in the Oracle Specific category. Oracle SAMPLE clause returns a random sample of rows. Useful for testing queries on large tables. The syntax is SELECT * FROM t SAMPLE(percentage);. It returns sampled result. A close relative is SEQUENCE (Oracle), which oracle: generates sequential numbers. Independent of tables. Accessed via NEXTVAL and CURRVAL. A close relative is ROWNUM / FETCH FIRST, which oracle: ROWNUM assigns sequential numbers to rows. Used for limiting results (pre-12c). A close relative is SYSDATE / CURRENT_DATE, which oracle: returns the current date and time of the database server. More about this category: Oracle-specific features — SEQUENCE, ROWNUM, SYSDATE, CONNECT BY, PL/SQL. Related Oracle Specific entries: SEQUENCE (Oracle), ROWNUM / FETCH FIRST, SYSDATE / CURRENT_DATE, CONNECT BY (Hierarchical), DUAL Table, MERGE INTO (Oracle), FLASHBACK QUERY, WITH FUNCTION (Oracle 12c+).