The column request_params
is of type blob.
Then use a BLOB
:
create or replace PROCEDURE INSERT_USER(
in_user_id IN VARCHAR2,
in_user_name IN VARCHAR2,
in_request_params IN BLOB
)
AS
BEGIN
insert into user_table(user_id,user_name,request_params)
values(in_user_id,in_user_name,in_request_params);
END INSERT_USER;
/
or the same types as the table's columns (which would also be a BLOB
):
create or replace PROCEDURE INSERT_USER(
in_user_id IN user_table.user_id%TYPE,
in_user_name IN user_table.user_name%TYPE,
in_request_params IN user_table.request_params%TYPE
)
AS
BEGIN
insert into user_table(user_id,user_name,request_params)
values(in_user_id,in_user_name,in_request_params);
END INSERT_USER;
/
how to pass blob from JAVA applictain ? I mean can I covert JSON string to blob in JAVA
Use the PreparedStatement.setBinaryStream
or PreparedStatement.setBlob
functions. An example is in this answer (and if you have a JSON string then just get the bytes from the string and stream that to the blob).