Pular para o conteúdo

Fóruns Banco de dados Oracle Mudar tabelas de tablespace Mudar tabelas de tablespace

#93064
fsitja
Participante

    CTAS significa Create Table As Select:

    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Connected as FSITJA

    SQL>
    SQL> create table t (col long);

    Table created
    SQL> insert into t values ('ABC');

    1 row inserted
    SQL> commit;

    Commit complete
    SQL> create table t2 as
    2 select to_lob(col) col from t;

    Table created
    SQL> drop table t;

    Table dropped
    SQL> rename t2 to t;

    Table renamed
    SQL> desc t;
    Name Type Nullable Default Comments


    COL CLOB Y
    SQL> select * from t;

    COL

    ABC

    SQL>