473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

change long row to blob

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
Jul 19 '05 #1
2 8480
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.

tr********@yahoo.com.hk (tracy) wrote in message news:<5c**************************@posting.google. com>...
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

Jul 19 '05 #2
cs
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
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Carolyn Longfoot | last post by:
Help! This is driving me crazy... I'm trying to read a BLOB from a db and display it in a browser, like so: $query="SELECT blob from table where blob_id=9"; $result=mysql_query($query);...
1
by: M Bouloussa | last post by:
Hi, can you help me ? My problem is : I have two tablespaces (sdata0 and sdata1) On the first tablespace (sdata0) I would to store all the data except long raw data and on the second...
3
by: hamvil79 | last post by:
I'm implementig a java web application using MySQL as database. The main function of the application is basically to redistribuite documents. Those documents (PDF, DOC with an average size around...
15
by: Daniel Schuchardt | last post by:
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); ...
3
by: Alexander Widera | last post by:
Hi, i connect to a ms sql2000server via SqlConnection. if i make an SqlCommand "INSERT INTO mytable (mytext) VALUES (@mytext)" (or i make an update), and i pass the parameter @mytext a simple...
1
by: Jozef | last post by:
Hello, I have some blob code that I use to polulate an OLE field with various files. Some of the files are images. The information in the field says "Long Binary Data" regardless of what I am...
0
by: Biztalk Migration | last post by:
I am new to using BLOB with oracle stored proc. I dont knw how to set the size of the buffer which seems to overflow no matter what i used to pass it. I am getting an error ...
9
by: matt | last post by:
hello, im doing my first ASP.NET app that inserts & retrieves files from Oracle (no need for a discussion on *that*!). i learned first-hand of the somewhat awkward technique for inserting...
2
by: tracy | last post by:
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! SQLDESC STUD_PHOTO; Name ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.