Binding NULL in a prepared statement
Hello,
I'm trying to bind NULL for a nullable datetime column using a prepared statement as follows -
session.sql("UPDATE `table` SET `datetime` = ? WHERE `id` = 1").bind(NULL).execute();
This crashes.
Passing null as string gives the following error - "Invalid value for datetime column: 'null'"
How do I achieve this?
Subject
Views
Written By
Posted
Binding NULL in a prepared statement
1888
January 27, 2019 10:55AM
763
January 29, 2019 09:37AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.