Currently, I have an Pictures Folder with a list of user portraits in JPG format named after the user's primary key.
I would like to store them in a table so I can query them and display the picture next to their matching records.
I started the following and not sure where I was heading and what else I need to do. I have never dealt with BLOB and Bfile before so please give me some pointers.
Step 1:Create directory |
---|
CREATE DIRECTORY UPLOAD_PICTURES AS 'C:\pictures'; |
Step 2:Create Table |
---|
create table pictures ( bfile_id varchar2(10), bfile_loc bfile) TABLESPACE users storage (initial 1m next 1m pctincrease 0) |
Step 3:Insert into table |
---|
INSERT INTO pictures VALUES('UID0006085',bfilename('UPLOAD_PICTURES','UID0006085.JPG')); |