Posted on 2008-11-26 18:17
Prayer 閱讀(227)
評論(0) 編輯 收藏 引用 所屬分類:
數(shù)據(jù)庫,SQL
select into 和 insert into select 兩種表復(fù)制語句
第一句(select into from)要求目標(biāo)表(destTbl)不存在,因?yàn)樵诓迦霑r(shí)會自動創(chuàng)建。
第二句(insert into select from)要求目標(biāo)表(destTbl)存在,由于目標(biāo)表已經(jīng)存在,所以我們除了插入源表(srcTbl)的字段外,還可以插入常量.