How we can copy one table data into another table whose name
same as table but in differ database

Answer Posted / bhas

CREATE TABLE `bhas`.`cds` ( table structure and data)

INSERT INTO `bhas`.`cds`
SELECT *
FROM `cdcol`.`cds` ;

where bhas is new db and cds is table name, cdcol is old db

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I start mysql?

656


What is the datatype of image in mysql?

663


What is cast in mysql?

664


Write command to import an mysql file?

690


How to drop an existing index in mysql?

767


What is back end and front end?

668


Consider a scenario where you have to send an email to a client from the sql database. How do you think you can achieve this task?

753


What are the differences between binary and varbinary?

709


How to escape special characters in sql statements?

710


Can we store pdf files in mysql?

660


What can I do with mysql?

669


In which language mysql has been written?

1064


What is the default port for MySQL Server?

758


How many rows we can insert in a mysql table?

699


How to enter boolean values in sql statements?

736