36.6 SYNCHRONIZE_TABLE_DEFINITION Procedure
This procedure synchronizes the local table definition with the data profile.
If the table does not exist, a CREATE TABLE statement executes. Table columns are created for visible data profile columns.
                  
If the table already exists, a series of ALTER TABLE statements execute in order to align the table with the data profile.
                  
Syntax
APEX_REST_SOURCE_SYNC.SYNCHRONIZE_TABLE_DEFINITION (
    p_module_static_id      IN VARCHAR2,
    p_application_id        IN NUMBER  DEFAULT {current application id}
    p_drop_unused_columns   IN BOOLEAN DEFAULT FALSE );Parameters
Table 36-6 SYNCHRONIZE_TABLE_DEFINITION Procedure Parameters
| Parameter | Description | 
|---|---|
| p_module_static_id | Static ID to identify the REST Data Source. | 
| p_application_id | (Optional) The application ID. | 
| p_drop_unused_columns | If TRUE, the procedure also drops columns which do not exist in the data profile any more. | 
Example
The following example demonstrates bringing the local synchronization table in sync with the data profile after the REST Data Source named "rest_movie" has changed.
BEGIN
    apex_session.create_session(
        p_app_id          => 100,
        p_app_page_id     => 1,
        p_username        => '...' );
    apex_rest_source_sync.synchronize_table_definition(
        p_module_static_id     => 'rest_movie',
        p_drop_unused_columns  => true );
END;
Parent topic: APEX_REST_SOURCE_SYNC