2

I have searched across SO related questions, but I couldn't find the solution for :

How to set timestamp to NULL during an insert to DB or an update ? (in postgresql).

If I put NULL like pstat.setTimestamp(idx++, null); I get an error which says that the type I put in is integer and that I should cast to Timestamp.

As definition for this table column, I use : ADD COLUMN admin_validation_date timestamp with time zone

Thank you for your help.

1 Answer 1

3
pstat.setNull(idx++, Types.TIMESTAMP);

should do it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.