1.1

Table Of Contents
-- create a table whose city_id column references the
-- primary key in the Cities table
-- using a column-level foreign key constraint
CREATE TABLE CONDOS
(
CONDO_ID INT NOT NULL CONSTRAINT hotels_PK PRIMARY KEY,
CONDO_NAME VARCHAR(40) NOT NULL,
CITY_ID INT CONSTRAINT city_fk REFERENCES Cities ON DELETE RESTRICT
)
PARTITION BY Clause
The SQLFire partitioning clause controls the locality and distribution of data in the given server groups. This is
important for optimizing queries, and it is essential for cross-table joins. The clause can be one of column
partitioning, range partitioning, list partitioning, or generic expression partitioning.
Syntax
{
{
PARTITION BY PRIMARY KEY |
Partitioning by ColumnExample with PARTITION BY COLUMN Clause ( column-name
[ , column-name ]* ) }
|
Partitioning by a Range of ValuesExample with PARTITION BY RANGE
Clause ( column-name )
(
VALUES BETWEEN
value
AND
value
[ , VALUES BETWEEN
value
AND
value ]*
)
|
Partitioning by a List of ValuesExample of List Partitioning (
column-name )
(
VALUES ( value [ , value ]* )
[ , VALUES ( value [ , value ]* ) ]*
)
|
Partitioning by ExpressionExample of PARTITION BY ( expression )
}
[
Colocating Related RowsExample of Colocating Related Rows from Multiple
Tables ( table-name [ , table_name ] * ) ]
}
[
REDUNDANCY ClauseExample with REDUNDANCY Clause on page 487
integer-constant ]
[
BUCKETS Clause on page 487
integer-constant ]
[
483
SQL Language Reference