W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
insert into table_1 select * from table_2;
兩張數(shù)據(jù)表結(jié)構(gòu)不一致的情況:
insert into table_1 (col_name1, col_name2) .... select col_name1, col_name2 form table_2
2.在創(chuàng)建表的時(shí)候,將已經(jīng)存在的數(shù)據(jù)表中的數(shù)據(jù)插入創(chuàng)建的表中。
create table table_name like table_exist select * from //如果不添加select * from table_exist(已經(jīng)存在的數(shù)據(jù)表),此時(shí)僅僅將table_exist的結(jié)構(gòu)復(fù)制給table_name
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: