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

Explain about various levels of constraint.

698


What is a constraint?

729


what is the difference between cluster and non cluster index? : Sql dba

729


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

752


How does stored procedure reduce network traffic?

730






i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this

1277


What is the limitation on the block size of pl/sql?

697


Explain dml and ddl?

736


Write a sql query to find the names of employees that begin with ‘a’?

741


Can instead of triggers be used to fire once for each statement on a view?

708


what are the different tables present in mysql? : Sql dba

678


What is a left inner join?

706


What is the difference between a procedure and a function?

695


Can ddl statements be used in pl/sql?

791


In pl/sql, what is bulk binding, and when/how would it help performance?

731