Let us understand how we can manipulate data for a partitioned table.
We can insert data using the table (most preferred way).
As we define table for each partition, we can insert data using table created for specific partition.
In the case of users_part
 partitioned table, we can either use table nameusers_part
 or partition name users_part_u
 to insert records with user_role ‘U’.
As part of the update, if we change the value in a partitioned column which will result in changing partition, then internally data from one partition will be moved to other.
We can delete the data using the table or the table created for each partition (either by using table name users_part
 or partitions such as users_part_u
, users_part_a
 etc
user_id | user_first_name | user_last_name | user_email_id | user_email_validated | user_password | user_role | is_active | created_dt | last_updated_ts |
---|---|---|---|---|---|---|---|---|---|
5 | Scott | Tiger | scott@tiger.com | False | None | U | False | 2020-11-24 | 2020-11-24 12:12:08.505850 |
6 | Donald | Duck | donald@duck.com | False | None | U | False | 2020-11-24 | 2020-11-24 12:12:08.505850 |
7 | Mickey | Mouse | mickey@mouse.com | False | None | U | False | 2020-11-24 | 2020-11-24 12:12:08.505850 |
user_id | user_first_name | user_last_name | user_email_id | user_email_validated | user_password | user_role | is_active | created_dt | last_updated_ts |
---|---|---|---|---|---|---|---|---|---|
8 | Matt | Clarke | matt@clarke.com | False | None | A | False | 2020-11-24 | 2020-11-24 12:12:09.284614 |
5 | Scott | Tiger | scott@tiger.com | False | None | U | False | 2020-11-24 | 2020-11-24 12:12:08.505850 |
6 | Donald | Duck | donald@duck.com | False | None | U | False | 2020-11-24 | 2020-11-24 12:12:08.505850 |
7 | Mickey | Mouse | mickey@mouse.com | False | None | U | False | 2020-11-24 | 2020-11-24 12:12:08.505850 |
user_id | user_first_name | user_last_name | user_email_id | user_email_validated | user_password | user_role | is_active | created_dt | last_updated_ts |
---|---|---|---|---|---|---|---|---|---|
8 | Matt | Clarke | matt@clarke.com | False | None | A | False | 2020-11-24 | 2020-11-24 12:12:09.284614 |
6 | Donald | Duck | donald@duck.com | False | None | A | False | 2020-11-24 | 2020-11-24 12:12:08.505850 |
user_id | user_first_name | user_last_name | user_email_id | user_email_validated | user_password | user_role | is_active | created_dt | last_updated_ts |
---|---|---|---|---|---|---|---|---|---|
8 | Matt | Clarke | matt@clarke.com | False | None | A | False | 2020-11-24 | 2020-11-24 12:12:09.284614 |
5 | Scott | Tiger | scott@tiger.com | False | None | U | False | 2020-11-24 | 2020-11-24 12:12:08.505850 |