同实例下复制表的2种方法
生活随笔
收集整理的這篇文章主要介紹了
同实例下复制表的2种方法
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
很簡單的方法,可以略過。
需求:
在test庫下創(chuàng)建表,要求導(dǎo)入hellodb.students的數(shù)據(jù)。
方法1:
use test;
create table t2 as select * from hellodb.students;
方法2:
use test;
create table t1 like hellodb.students;
insert into t1 select * from hellodb.students;
方法2的效果更好,具體可以看下圖。
本文轉(zhuǎn)自 lirulei90 51CTO博客,原文鏈接:http://blog.51cto.com/lee90/1915800,如需轉(zhuǎn)載請自行聯(lián)系原作者
總結(jié)
以上是生活随笔為你收集整理的同实例下复制表的2种方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Qt学习之路(9):深入了解信号槽
- 下一篇: 3-2 文件夹类Directory的常用