12. Managing Tables and Views : Table Management : Table Location : Create a Table in an Alternate Location
 
Share this page                  
Create a Table in an Alternate Location
To create a table in a location other than the default location, use the WITH LOCATION clause of the CREATE TABLE statement.
In Director, use the Options in the New Table tab.
If you specify only one location, the entire table is stored in that location.
Create a table with columns in different locations:
CREATE TABLE sales_fact AS
    SELECT orders FROM sales
    WITH LOCATION(col1)=(location1), 
       LOCATION(col2)=(location2), 
       LOCATION(col3)=(location3);
Create a table that spans three locations (horizontally partitioned):
CREATE TABLE sales_fact AS
    SELECT orders FROM sales
    WITH LOCATION = (location1, location2, location3)