473,385 Members | 1,907 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,385 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 8477
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.