MySQL创建相同表和数据命令


创建和表departments结构和数据一样的表departments_t

mysql> create table departments_t like departments;

Query OK, 0 rows affected (1.61 sec)

 

mysql> insert into departments_t select * from departments;

Query OK, 9 rows affected (0.53 sec)

Records: 9  Duplicates: 0  Warnings: 0


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM