FROM Clause
A comma-separated list of data sources to query.
Syntax
FROM dataset [,... ] [ TABLESAMPLE(sampling_percent) ]
Parameters
dataset |
A set of data to query, which can be one of the following elements:
|
TABLESAMPLE |
A clause after You can only use the TABLESAMPLE clause with user-defined tables. Views, Data Collector (DC), and system tables are not supported. |
sampling_percent |
Specifies the percentage of records to be returned as a part of the sampling. The value must be greater than 0 and less than 100. |
Examples
The following example shows how you can return all records from the customer_dimension
table:
=> SELECT * FROM customer_dimension;
The following example shows how you can use the TABLESAMPLE clause:
=> SELECT * FROM user_name TABLESAMPLE(50); id | name ------+------- 111 | Barry 982 | Nero 8761 | Lou (3 rows)