The only advantage of using long raw isCode:10:21:40 SQL> create table test_raw ( id int, pict long raw) ; Table created. 10:22:18 SQL> create table test_blob (id int , pict blob); Table created. SQL> desc test_raw Name Null? Type ----------------------------------------- -------- ---------------------------- ID NUMBER(38) PICT LONG RAW SQL> desc test_blob Name Null? Type ----------------------------------------- -------- ---------------------------- ID NUMBER(38) PICT BLOB PICT2 BLOB SQL> alter table test_raw add somebig long ; alter table test_raw add somebig long * ERROR at line 1: ORA-01754: a table may contain only one column of type LONG 10:22:41 SQL> alter table test_raw add pict2 long raw ; alter table test_raw add pict2 long raw * ERROR at line 1: ORA-01754: a table may contain only one column of type LONG 10:23:02 SQL> alter table test_blob add pict2 blob; Table altered. 1* insert into test_raw values (10, null) 10:24:51 SQL> / 1 row created. 10:24:51 SQL> commit; Commit complete. 1* insert into test_blob values (10,null,null) 10:25:23 SQL> / 1 row created. 10:25:24 SQL> commit; Commit complete. 10:25:26 SQL> select * from test_raw ; ID P ---------- - 10 10:25:33 SQL> select * from test_blob ; SP2-0678: Column or attribute type can not be displayed by SQL*Plus 10:25:42 SQL> alter table test_raw move ; alter table test_raw move * ERROR at line 1: ORA-00997: illegal use of LONG datatype 10:26:24 SQL> alter table test_blob move ; Table altered.
you can execute "select * from long_raw_table" in sqlplus
which you can't do with blob.
The question is do we really need to
select raw column in sqlplus? No.
But if you use BLOB/CLOB, you get more advantages.
1 BLOB can be stored in a diff tablespace,
away from data tablespace.
2 Reorg of table is easy. MOVE command works.
3 You can have any number of BLOB/CLOB columns in the same table.
Tamil




Reply With Quote