Try OpenEdge Now
skip to main content
Table Partitioning
Table partitioning capabilities : SQL considerations
 

SQL considerations

OpenEdge SQL DDL and DML support table partitioning.
*The following OpenEdge SQL DDL statements are enhanced to support table partitioning:
*CREATE TABLE
*ALTER TABLE
*CREATE INDEX
*DROP TABLE
*DROP INDEX
*OpenEdge DQL DML supports table partitioning as follows:
*Updating records
You can use the existing UPDATE statement to update records of a partitioned table. You must have the WRITE permission on the partitioned table to update its records.
Updating a row in a partitioned table may result in one of the following:
*If unpartitioned key columns are updated, then the updated new record remains in its original partition. In this case, there is no change in the behavior of the UPDATE statement.
*If only one range partition key column is updated and the updated value is in the existing partition range, then the record remains in the existing partition.
*If one or more list partition key columns are being updated (or the range partition key column is updated and the new value are not in the existing partition), then the updated new record is moved to a different partition. The new partition ID is determined with the newly updated record’s partition key columns.
*If the new record’s partition key columns cannot determine any partition while updating the record, then the UPDATE statement returns an error stating that the updated row does not belong to any partition.
*Inserting rows
You can use the existing INSERT statement to insert rows into the specified partition of a partitioned table. You must have the WRITE permission on the partitioned table to add rows to it.
Executing the INSERT statement to insert rows into a partitioned table may result in an error in the following cases:
*If all partitioned columns of the partitioned table are not specified in the INSERT statement or if they do not have any default values when the table is created.
*If the specified values of the partitioned columns do not determine in which partition the row should be inserted.
*If there is no space allocated in the partition to which the inserted row belongs.
For more information on OpenEdge SQL syntax, see OpenEdge Data Management: SQL Development and OpenEdge Data Management: SQL Reference.