Home » SQL & PL/SQL » SQL & PL/SQL » How to store the table data(Backup)
How to store the table data(Backup) [message #606887] Thu, 30 January 2014 08:28 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

I Have 17 Lakh records , so how can i backup or how can i insert into another table using cursors or any other process.I want to backup the table data

Thank You
Re: How to store the table data(Backup) [message #606888 is a reply to message #606887] Thu, 30 January 2014 08:31 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
can you even spell SQL?

INSERT INTO BACKUP_TBL SELECT FROM SOURCE_TBL;
Re: How to store the table data(Backup) [message #606889 is a reply to message #606887] Thu, 30 January 2014 08:32 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
SQL> CREATE TABLE <new_table_name>
     AS SELECT * FROM <original_table>;


That is one way, CTAS.
Re: How to store the table data(Backup) [message #606890 is a reply to message #606889] Thu, 30 January 2014 08:34 Go to previous messageGo to next message
manubatham20
Messages: 566
Registered: September 2010
Location: Seattle, WA, USA
Senior Member

A bit faster.

create table
    new_mytab NOLOGGING PARALLEL <degree>
as
    select * from <mytab>
tablespace
    new_tablespace;


Is it one time or routine job?

[EDIT] And start using Million, Billion, because people may not understand lakh here.

Manu

[Updated on: Thu, 30 January 2014 08:35]

Report message to a moderator

Re: How to store the table data(Backup) [message #606892 is a reply to message #606890] Thu, 30 January 2014 08:42 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Lakh Smile
Re: How to store the table data(Backup) [message #606893 is a reply to message #606892] Thu, 30 January 2014 08:44 Go to previous messageGo to next message
manubatham20
Messages: 566
Registered: September 2010
Location: Seattle, WA, USA
Senior Member

Smile

 especially in the city of Karachi, the word "peti" is also used to denote one lakh rupees


There are many other words even - 'peti' , 'khokha', etc. It's all regional.
Re: How to store the table data(Backup) [message #606894 is a reply to message #606887] Thu, 30 January 2014 08:46 Go to previous message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
mist598 wrote on Thu, 30 January 2014 19:58
I Have 17 Lakh records , so how can i backup or how can i insert into another table using cursors or any other process.I want to backup the table data


For those who do not understand 17 lakh, it means 1.7 million.

@OP : With CTAS as suggested above, it should not take more than just a couple of seconds. Read these links,
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1415454871121
http://jonathanlewis.wordpress.com/2008/07/28/big-update/
Previous Topic: PLS-00201: identifier 'EMPNO' must be declare
Next Topic: exam seating plan & datesheet
Goto Forum:
  


Current Time: Thu Apr 25 18:00:01 CDT 2024