Abe
Abe

Reputation: 9051

How to insert empty_clob() from java to Oracle

I am having an NCLOB column in oracle. When I create a row, I need to insert an empty_clob() using normal java insert query. Does anyone know how this is done? I am looking for something like the one below from java.

INSERT INTO MY_TABLE VALUES(1,'Abraham','empty_clob');

Thanks and Regards, Abraham Menacherry

Upvotes: 2

Views: 2288

Answers (1)

javanna
javanna

Reputation: 60245

You should correct your insert statement:

INSERT INTO MY_TABLE VALUES(1,'Abraham',empty_clob());

You should also take a look here.

The empty_clob function is also useful as default value for the clob column.

Upvotes: 3

Related Questions