Mysql: how do I make an exact working copy of a table?
        Posted  
        
            by epo
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by epo
        
        
        
        Published on 2010-05-20T19:34:14Z
        Indexed on 
            2010/05/20
            19:40 UTC
        
        
        Read the original article
        Hit count: 218
        
mysql
|mysql-triggers
I am working on a restructuring of a legacy database and its associated applications. To keep old and new working in parallel I have created a development database and copied the tables of interest to it, e.g.
create database devdb;
drop table if exists devdb.tab1;
CREATE TABLE devdb.tab1 like working.tab1;
insert into devdb.tab1 select * from working.tab1;
Having done this I notice that triggers affecting tab1 have not been copied over. Is there any way in which I can produce a working copy of tab1, i.e. data, permissions, triggers, everything?
© Stack Overflow or respective owner