TABLESAMPLE
TABLESAMPLE is a SQL clause in the SELECT Queries category. Returns a random sample of rows. Available in SQL Server, PostgreSQL, and some databases. The syntax is SELECT * FROM table TABLESAMPLE SYSTEM(percentage);. It returns random sample of rows. A typical example: SELECT * FROM employees TABLESAMPLE SYSTEM(10); -- Approximately 10% of rows (random sample) A close relative is SELECT, which retrieves data from a table. The most fundamental SQL statement. A close relative is SELECT *, which selects all columns from a table. A close relative is SELECT DISTINCT, which returns only distinct (unique) values from the specified columns. More about this category: Core SELECT query clauses — SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT. Related SELECT Queries entries: SELECT, SELECT *, SELECT DISTINCT, WHERE, AND / OR / NOT, IN, BETWEEN, LIKE. This page is part of the free SQL Reference documentation covering 762+ statements, functions, and clauses, each with syntax, parameters, return values, and examples for MySQL, PostgreSQL, SQL Server, and SQLite.