yxhxj2006

          常用鏈接

          統(tǒng)計

          最新評論

          如何在Oracle中復(fù)制表結(jié)構(gòu)和表數(shù)據(jù)

          如何在Oracle中復(fù)制表結(jié)構(gòu)和表數(shù)據(jù) 

          1. 復(fù)制表結(jié)構(gòu)及其數(shù)據(jù):

          create table table_name_new as select * from table_name_old

          2. 只復(fù)制表結(jié)構(gòu):

          create table table_name_new as select * from table_name_old where 1=2;

          或者:

          create table table_name_new like table_name_old

          3. 只復(fù)制表數(shù)據(jù):

          如果兩個表結(jié)構(gòu)一樣:

          insert into table_name_new select * from table_name_old

          如果兩個表結(jié)構(gòu)不一樣:

          insert into table_name_new(column1,column2...) select column1,column2... from table_name_old

          posted on 2013-11-05 21:29 奮斗成就男人 閱讀(174) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 苏州市| 青冈县| 什邡市| 河北区| 叙永县| 长泰县| 中西区| 浦东新区| 阳山县| 天台县| 内江市| 固原市| 宜丰县| 鹰潭市| 樟树市| 上栗县| 民权县| 邛崃市| 滕州市| 许昌市| 鹿邑县| 昆山市| 正定县| 久治县| 增城市| 荆门市| 江永县| 灌南县| 精河县| 永州市| 布尔津县| 中江县| 曲阳县| 仙居县| 洛浦县| 方山县| 繁昌县| 来凤县| 竹山县| 大邑县| 揭西县|