首頁 > 資料庫 > mysql教程 > mysql 表的相關操作

mysql 表的相關操作

黄舟
發布: 2017-01-17 13:10:48
原創
1383 人瀏覽過

mysql 表的相關操作

創建表 

create table tt
登入後複製

沒有才創建表 

create table if not exists tt
登入後複製

沒有才創建表 

create table t2 like t1  
create table t2 select * from t1 where 1 = 2
登入後複製

的話,

insert into t2 select * from t1
登入後複製
只需要複製某些字段,
insert into t2 (column1, column2, ...) select (column1, column2, ...) from t1
登入後複製
以上就是mysql 表的相關操作的內容,更多相關內容請關注PHP中文網(www.php.cn)!

相關標籤:
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
請問一下關聯表查詢如何操作?
來自於 1970-01-01 08:00:00
0
0
0
新增操作失敗
來自於 1970-01-01 08:00:00
0
0
0
new操作符的作用什麼?
來自於 1970-01-01 08:00:00
0
0
0
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板