raaj
raaj

Reputation: 3291

H2 Database timestamp insert null

Good Day,

I need to clear a timestamp on my H2 Database. I can set values but I can't set it to null/clear it!

What is the command?

UPDATE TABLE SET DATE='null' WHERE USERNAME='User'

doesnt work!

Upvotes: 1

Views: 4437

Answers (1)

user330315
user330315

Reputation:

'null' is a string with the text null, it's not the value NULL.

You need to remove the single quotes:

UPDATE the_table 
   SET DATE = null 
WHERE USERNAME='User'

Upvotes: 6

Related Questions