How to copy a table in another table with datas?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why primary key is required?

558


How do you use join?

524


What are the advantages of sql?

560


How can we avoid duplicating records in a query?

565


What is a function in oracle pl sql?

543






What is a temp table?

569


what is the syntax for using sql_variant_property? : Transact sql

533


What is sql server and ase?

540


Mention what are the benefits of pl/sql packages?

537


What is a Mapplet?

645


Explain the difference between 'between' & 'and' operators in sql

531


In what condition is it good to disable a trigger?

556


Difference between global and parameter variables?

1458


How many commands are in sql?

525


How to create your own reports in sql developer?

542