|SQL - Structured Query Language|
Data Partitioned Technique - VIEW
Partitioned views allow the data in a large table to be split into smaller member tables. The data is partitioned between the member tables based on ranges of data values in one of the columns. The data ranges for each member table are defined in a CHECK constraint specified on the partitioning column.
A view that uses UNION ALL to combine selects of all the member tables into a single result set is then defined. When SELECT statements referencing the view specify a search condition on the partition column, the query optimizer uses the CHECK constraint definitions to determine which member table contains the rows.
The following queries are used to create Supplier_North, Supplier_East, Supplier_West and Supplier_South tables and insert some sample records.
Query Output Screen
* * * * *