Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to copy a table in another table with datas?

Answers were Sorted based on User's Feedback



How to copy a table in another table with datas?..

Answer / guest

If new table is not yet created,
create table new_table as select * from old_table;

if new table is already created,
insert into new table select * from old_table
provided the structure of the new table is same as old
table.

Is This Answer Correct ?    21 Yes 1 No

How to copy a table in another table with datas?..

Answer / guest

If new table is not yet created,
create table new_table as select * from old_table;

if new table is already created,
insert into new table select * from old_table
provided the structure of the new table is same as old
table.

Is This Answer Correct ?    8 Yes 0 No

How to copy a table in another table with datas?..

Answer / kavitha nedigunta

create table new_table as select * from old_table;

EG:- create table emp1 as select * from emp;

Is This Answer Correct ?    3 Yes 0 No

How to copy a table in another table with datas?..

Answer / meher

copy from user_name/password@schema_name insert
target_table_name using select * from source_table_name;

Is This Answer Correct ?    4 Yes 2 No

How to copy a table in another table with datas?..

Answer / monty

if you have a table employee you can create duplicate
record using into statement

select *into backup_employee from employee

the above statement create new table backup_employee with
same data of employee

Is This Answer Correct ?    2 Yes 0 No

How to copy a table in another table with datas?..

Answer / mohan

create table emp_dup as select * from emp:

if we have already structure means:

Insert into emp_dup(select * from emp);

Is This Answer Correct ?    2 Yes 0 No

How to copy a table in another table with datas?..

Answer / selvaraj v

In Oracle 10g :
---------------

Create New Table in another table with same data's:
---------------------------------------------------

copy from coeot1a2/coeot1a2@coeau to scott/tiger@coeau
CREATE s11 using select * from major_list;

Insert data's into another table with same data's:
---------------------------------------------------

copy from coeot1a2/coeot1a2@coeau to scott/tiger@coeau
INSERT s11 using select * from major_list;

Append data's into another table with same data's:
---------------------------------------------------

copy from coeot1a2/coeot1a2@coeau to scott/tiger@coeau
APPEND s11 using select * from major_list;

Replace data's into another table with same data's:
---------------------------------------------------

copy from coeot1a2/coeot1a2@coeau to scott/tiger@coeau
REPLACE s11 using select * from major_list;

Is This Answer Correct ?    0 Yes 0 No

How to copy a table in another table with datas?..

Answer / raghunanda

---With date from existing table to new table.
SQL> create table new_table_name as select * from old_table_name where 1=1;
---without data
SQL> create table new_table_name as select * from old_table_name where 1=2;

Thanks,

Is This Answer Correct ?    0 Yes 0 No

How to copy a table in another table with datas?..

Answer / sanjeev

create table new table name as select * from new table name

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

How do I write a cron which will run a sql query and mail the results to agroup?

0 Answers  


If we have n no of columns in a table, can we add new column in that table with not null constraint?

2 Answers  


What is oracle and pl sql?

0 Answers  


What are the datatypes available in pl/sql ?

0 Answers  


How do I kill a query in postgresql?

0 Answers  


difference between table level constraint and column level and advantages of table level constraint

4 Answers   Doyensys,


using subquery how can i calculate working days in a month?

3 Answers   Spice Telecom,


Can we enter data in a table in design view?

0 Answers  


How do I run a pl sql procedure in sql developer?

0 Answers  


What is composite data type in pl sql?

0 Answers  


What is sql prepared statement?

0 Answers  


What is sql dialect?

0 Answers  


Categories