1

I have studied this post on Stack Overflow: Fastest way to copy a table in MySQL.

But no answer is copying everything like the table's structure, data, indexes as well as associated triggers.

  • Is it possible in MySQL? If yes, how can we do this?
  • Is it also possible to copy triggers from one table to another?
4
  • CREATE TABLE a LIKE b;INSERT INTO a SELECT * FROM b
    – Mihai
    Commented Aug 12, 2014 at 8:14
  • No, it will not work. I have already tried both commands.
    – ursitesion
    Commented Aug 12, 2014 at 8:19
  • Tested on my machine,maybe you`re not using mysql.
    – Mihai
    Commented Aug 12, 2014 at 8:23
  • I am using MysQL-5.1.53 community edition.
    – ursitesion
    Commented Aug 12, 2014 at 8:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.