Home > computers > databases > mysql > mysqlinsertselect | About

use the insert select syntax, like this

mysql> INSERT INTO mail.users (email,maildir,password,quota)  
SELECT email,maildir,password,quota 
FROM dbispconfig.mail_user;
Query OK, 566 rows affected (0.07 sec)
Records: 566  Duplicates: 0  Warnings: 0

mysql> 

In the upper code fragment I am copying data from an old ispconfig mail installation to a newer, customised manual setup for a brand new mail server.


contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code mysqlinsertselect (generated for current page)