Oracle怎样利用现有的表创建一张新表,只要表结构相同

解决方案 »

  1.   

    SELECT * INTO NEWTT FROM TT WHERE 1>2
      

  2.   

    一楼的语句在Oracle 中是行不通的。SQL> create table c as select * from a;Table created.SQL> desc c;
     Name                                      Null?    Type
     ----------------------------------------- -------- ---------------- ID                                                 NUMBER(38)
     NAME                                               VARCHAR2(10)
     AGE                                                NUMBER(38)
     CARDID                                             NUMBER(38)SQL>
    当您的问题得到解答后请及时结贴.
    http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
      

  3.   

    create table new_tab as select * from old_tab where rownum=1;
      

  4.   

    create table t1 as select * from table where 1<>1
      

  5.   


    同意这个create table tt1 as select * from t1 where 1<>1
      

  6.   

    code=SQL]create table tb as select * from old_table where 1=2;[[/code]
      

  7.   

    create table tb as select * from old_table where 1=2;[
      

  8.   

    create table tb as select * from old_table where 1=2;
      

  9.   

    create table newtablename as select * from oldtablename where rownum=0 ;此表创建后需重新创建索引等信息。
      

  10.   

    create or replace tbname as select * from oldtb where 1<>1;
      

  11.   

    楼上的,你的是什么数据库的方法?
    create table test as select * from testb where 1=0
      

  12.   


    create table newtablename as select * from oldtablename where rownum=0 ;
      

  13.   

    create table XXXX as select * from XXXX where XXXX
      

  14.   

    create table t1 as select * from table where 1=2
      

  15.   

    create table c as select * from a
      

  16.   

    create table tt1 as select * from t1 where 1 = 2
      

  17.   

    很简单的,
    CREATE NEWTABLE 
    AS
    SELECT * FROM  OLDTABLE WHERE 1=2;
      

  18.   

    CREATE TABLE A AS SELECT * FROM TABLE_NAME WHERE 1<>1