Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7809853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:33:56+00:00 2026-06-02T03:33:56+00:00

I have a big table with partitions. ex: CREATE TABLE cust_order ( cust_id NUMBER(10),

  • 0

I have a big table with partitions.
ex:

CREATE TABLE cust_order (
cust_id     NUMBER(10), 
start_date   VARCHAR2(25), 
amount_sold NUMBER(10,2))
PARTITION BY RANGE (START_DATE)
(  
PARTITION MAY VALUES LESS THAN ('20120601'),
PARTITION DEF VALUES LESS THAN(MAXVALUE));

I want to alter the table so that the MAY partition contains values less than ‘20120501’ and that the data from ‘20120501’ to ‘20120601’ are stored in the DEF partition.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:33:57+00:00Added an answer on June 2, 2026 at 3:33 am

    First, you should always store dates in DATE columns. Storing dates in a VARCHAR2(25) column is a recipe for problems down the line– someone will inevitably insert a string that has an unexpected format.

    Second, assuming that there are no partitions between the MAY and DEF partitions, you could split the MAY partition

    ALTER TABLE cust_order
      SPLIT PARTITION may AT ('20120501')
       INTO( PARTITION may,
             PARTITION june_temp )
     UPDATE GLOBAL INDEXES;
    

    and then merge the JUNE_TEMP and DEF partitions

    ALTER TABLE cust_order
      MERGE PARTITIONS june_temp, def
       INTO PARTITION  def
    

    I’m not sure that I see the wisdom, however, in doing this… A default partition should not generally store any data– it’s generally only there so that inserts don’t error out if they have an unexpectedly large partition key. So taking the data that is already in one partition and moving it into a default partition seems rather odd. If you’re just going to create a JUNE partition in the future, I’m not sure why you wouldn’t just split the partitions into a MAY and JUNE partition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have big records to copy values from table B to table A. Currently
I have a very big table with many columns. Values in some of the
I'm trying to create partitions in one big table, but I'm getting this error:
I have a big table containing a button in each cell. These buttons are
I have a big problem. I want to extract text from html table that
so I have this HTML table with a bunch of big numbers in it
I have BIG table with multiple indexes in postgres. It has indexes on db_timestamp,
I have pretty big table with lots of columns. I want to find all
I have a big table with vertical scroll bar. I would like to scroll
I have this problem. I have a big table with categories in THEAD and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.