How to copy a table in another table with datas?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql*plus?

571


Name the operator which is used in the query for pattern matching?

505


What is the best sql course?

534


Why do we need a foreign key?

551


define join and explain different type of joins? : Sql dba

546






Cite the differences between execution of triggers and stored procedures?

624


How do you update f as m and m as f from the below table testtable?

1084


What are the different types of constraints?

566


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

555


What is a behavioral trigger?

517


Does truncate remove indexes?

563


What is sqlservr exe?

480


What is cross join sql?

500


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2095


How do I start sql from command line?

535