dbTalk Databases Forums  

change long row to blob

comp.databases.oracle comp.databases.oracle


Discuss change long row to blob in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tracy
 
Posts: n/a

Default change long row to blob - 06-22-2004 , 02:56 AM






I plan to change the datatype from long raw to blob as from tables
stud_photo and cimpant _image below. But i am not sure if it is a good
idea. pls advise.
TQ!


SQL> DESC STUD_PHOTO;
Name Null? Type
------------------------------- -------- ----
STUD_ID NOT NULL VARCHAR2(15)
STUD_PHOTO LONG RAW
STUD_UPD_BRANCH VARCHAR2(1)
STUD_DATETIME DATE

SQL> DESC CONPANY_IMAGE;
Name Null? Type
------------------------------- -------- ----
IMAGE_ID NOT NULL VARCHAR2(10)
IMAGE LONG RAW

Reply With Quote
  #2  
Old   
Romeo Olympia
 
Posts: n/a

Default Re: change long row to blob - 06-22-2004 , 12:06 PM






Sure, go ahead. LONG datatypes are there mostly for backward
compatibility. For new applications or existing ones that allow it
(and often do), go for LOBs. Most of the restrictions that go with
using LONG datatypes are not an issue when using LOB datatypes.

tracykim10 (AT) yahoo (DOT) com.hk (tracy) wrote in message news:<5c91cce9.0406212356.529175ec (AT) posting (DOT) google.com>...
Quote:
I plan to change the datatype from long raw to blob as from tables
stud_photo and cimpant _image below. But i am not sure if it is a good
idea. pls advise.
TQ!


SQL> DESC STUD_PHOTO;
Name Null? Type
------------------------------- -------- ----
STUD_ID NOT NULL VARCHAR2(15)
STUD_PHOTO LONG RAW
STUD_UPD_BRANCH VARCHAR2(1)
STUD_DATETIME DATE

SQL> DESC CONPANY_IMAGE;
Name Null? Type
------------------------------- -------- ----
IMAGE_ID NOT NULL VARCHAR2(10)
IMAGE LONG RAW

Reply With Quote
  #3  
Old   
cs
 
Posts: n/a

Default Re: change long row to blob - 07-01-2004 , 02:22 PM



Hi

you can change the datatype of the column by using alter command

here is the example

database version 9.2.0.4

sys@ORCL$ create table company_image(image_id varchar2(10),
image long raw);

sys@ORCL$ alter table company_image modify image blob;

Table altered.

sys@ORCL$ desc company_image
Name Null? Type
-----------------------------------------
IMAGE_ID VARCHAR2(10)
IMAGE BLOB



sekhar

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.