Save Null in the database

There are 2 fields in a table that store a value. After a certain amount of time or after a certain movement occurs, I need these fields to be cleared, or to return to the NULL state. I cannot delete or delete the entire record, the other information must remain. I just need these 2 pieces of information in 2 fields to be cleared or null with no value.

I've already tried: in update, "null", "NULL", I left it empty, I also tested this one that I found here on the forum, "default(null)", it was in this post.

None of them cleared the fields, or left it null.

How could this be done?

Hi,

Put the expression null:
{{ null }}

It's different from:
{{ 'null' }}

Also make sure your database column accepts NULL values

Yes, the first thing I saw was whether it accepted NULL.
I used the quotes just to show what I was using in the parameter, I didn't use double quotes.
To simplify:

null
NULL
default(null)
I also tried empty with nothing in the field

and your two suggestions now
{{null}}
{{'null'}}

Neither of them work. I was hoping that with {{}}, it would work, I had forgotten about this before, but it still doesn't work.

We'll keep trying, but thanks for your help.

If you want further help please show a screenshot of what you're doing

This works perfectly {{null}}.

Thanks, I still have a lot to learn here.

I had a previous query, I changed its name, and when I was updating it, the update lost the ID reference. So when I was going to update it, it didn't know which ID to update.

I appreciate your patience, I'll get there one day.

1 Like