Home » SQL & PL/SQL » SQL & PL/SQL » Help required for adding patition by range in table (Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production)
Help required for adding patition by range in table [message #669865] Mon, 21 May 2018 01:35 Go to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
Hi,

Please help for adding partition by exchange to the table. I have executed following command but getting error:


   
 alter table TEST_TAB add 
 PARTITION BY RANGE ("LOAD_TIMESTAMP") 
 PARTITION "P_18MAY2018"  VALUES LESS THAN (TO_DATE(' 2018-05-19 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) SEGMENT CREATION DEFERRED 
    
  
Error report -
SQL Error: ORA-00902: invalid datatype
00902. 00000 -  "invalid datatype"
*Cause:    
*Action:

Re: Help required for adding patition by range in table [message #669866 is a reply to message #669865] Mon, 21 May 2018 01:39 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Syntax:
https://docs.oracle.com/cd/E11882_01/server.112/e25523/part_admin002.htm#i1007318
Re: Help required for adding patition by range in table [message #669867 is a reply to message #669866] Mon, 21 May 2018 01:58 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
Hi John,

I can see in reference document, Partition by range created during table creation. I want to add Partition by range to an existing table using ALTER Table.
Re: Help required for adding patition by range in table [message #669868 is a reply to message #669865] Mon, 21 May 2018 01:59 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
Hi John,

In the given document partition by range created during table creation but my request for adding partition by range using ALTER TABLE.
Re: Help required for adding patition by range in table [message #669869 is a reply to message #669866] Mon, 21 May 2018 02:05 Go to previous message
msol25
Messages: 396
Registered: June 2011
Senior Member
Thanks John,

I got the syntax in reference document.

Thanks. Razz
Previous Topic: Procedure
Next Topic: Oracle Role creation on Schema
Goto Forum:
  


Current Time: Fri Mar 29 05:02:47 CDT 2024