Home > Database > Mysql Tutorial > body text

mysql数据库之间表的复制语句_MySQL

WBOY
Release: 2016-06-01 13:42:38
Original
1050 people have browsed it

bitsCN.com
mysql数据库之间表的复制 引用1.MySQL 5.1; 2.数据库db_1有一个表t_1; 3.还有一个数据库db_2; 4.把t_1复制到db_2;   进入MYSQL Command Line Client

输入:use db_2;进入db_2数据库 
Java代码  
CREATE TABLE t_1 LIKE db_1.t_1//复制表结构   
INSERT t_ SELECT * FROM db_1.t_1//复制表数据     作者 hanxin830311 bitsCN.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template