How to get partition script for a table ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhishekitb
    New Member
    • Mar 2007
    • 8

    How to get partition script for a table ?

    Hello,

    I need to get partition script for a table.
    As we get create table script , i need a table's Partition script.
    please help me with your expertise.
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Originally posted by abhishekitb
    Hello,

    I need to get partition script for a table.
    As we get create table script , i need a table's Partition script.
    please help me with your expertise.
    Find about creating partition tables here and here

    Comment

    • abhishekitb
      New Member
      • Mar 2007
      • 8

      #3
      Originally posted by amitpatel66
      Find about creating partition tables here and here

      Hello Amit,

      Thanks for the informative reply.
      Is it possible to get table partition script ?
      If Yes, how can i get it ?

      because i have not created the table partition, and i need the table partition script to create it some other db.
      please send me your thoughts.

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Originally posted by abhishekitb
        Hello Amit,

        Thanks for the informative reply.
        Is it possible to get table partition script ?
        If Yes, how can i get it ?

        because i have not created the table partition, and i need the table partition script to create it some other db.
        please send me your thoughts.
        You can make use of the logic that is given in the links that I have provided you in the pervious POST to create a table with partitions

        Comment

        • abhishekitb
          New Member
          • Mar 2007
          • 8

          #5
          Originally posted by amitpatel66
          You can make use of the logic that is given in the links that I have provided you in the pervious POST to create a table with partitions
          Thanks for the reply. I did not get answers to my questions.
          It's okay..!! i'l find it out.

          Comment

          • amitpatel66
            Recognized Expert Top Contributor
            • Mar 2007
            • 2358

            #6
            Originally posted by abhishekitb
            Thanks for the reply. I did not get answers to my questions.
            It's okay..!! i'l find it out.
            Please be more specific to your requirement.
            You want to create a table with partition?
            or
            you want to partition an existing table? (If this is the requirement, then you CANNOT partition the existing table)

            Comment

            • abhishekitb
              New Member
              • Mar 2007
              • 8

              #7
              Originally posted by amitpatel66
              Please be more specific to your requirement.
              You want to create a table with partition?
              or
              you want to partition an existing table? (If this is the requirement, then you CANNOT partition the existing table)

              OK, i'l be more specific.
              I already have a table with partition.
              now, i want to get only the partition script of the table. Is it possible?

              Comment

              • Saii
                Recognized Expert New Member
                • Apr 2007
                • 145

                #8
                If you work on some IDE like Toad, you can eaily get the script from there.

                Else you can use dbms_metadata package.

                select dbms_metadata.g et_ddl('TABLE', '<tab-name>','<schema >') from dual;

                Just check if it works for partitioned table too.
                Hope that helps!!!

                Comment

                Working...