oracle| Stored Procedure test environment: Win2000 + Oracle92
The process of storing a picture file, any development tool can store the picture text in the database by calling the procedure.
Detailed steps:
Microsoft Windows 5.00.2195 [Version]
(C) Copyright 1985-2000 Microsoft Corp.
C:\Documents and settings\chanet>cd\
C:\>sqlplus/nolog
Sql*plus:release 9.2.0.1.0-production on Wednesday January 19 14:46:21 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Sql> Connect chanet/chanet@oradb;
is connected.
Sql> CREATE TABLE Image_lob (t_id VARCHAR2 (5) Not null,t_image BLOB not NULL);
Table has been created.
sql> CREATE OR REPLACE DIRECTORY IMAGES as ' C:\Oracle '; --Photo Catalogue
The directory has been created.
sql> CREATE OR REPLACE PROCEDURE img_insert (TID varchar2,filename VARCHAR2) as
2 F_lob BFILE;
3 B_lob BLOB;
4 BEGIN
5 INSERT into Image_lob (t_id, T_image)
6 VALUES (Tid,empty_blob ()) return t_image into B_lob;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.