Title: Support for NULL values
Last modified: March 2, 2023

---

# Support for NULL values

 *  [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/support-for-null-values/)
 * Let’s say I want to store an optional numerical value, but in the current implementation
   if I leave a numerical field blank it is saved as a blank value in post_meta 
   by ACF (correct) but as a 0 (zero) in the custom table, which is a falsy value
   but doesn’t clearly indicate whether the field was left blank or someone manually
   entered 0. (e.g. 0 can be a valid value in some cases).
   Also, when I save this
   new post for the first time the values are being read back from the custom table,
   which outputs “0” in the numerical field. Saving the post again changes the blanks
   in postmeta table to “0” for the saved post.
 * Furthermore, if the field validation is not-required then the SQL field can be
   marked as nullable?
    -  This topic was modified 3 years, 3 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).

The topic ‘Support for NULL values’ is closed to new replies.

 * ![](https://ps.w.org/acf-to-custom-database-tables/assets/icon-256x256.jpg?rev
   =2644321)
 * [ACF to Custom Database Tables](https://wordpress.org/plugins/acf-to-custom-database-tables/)
 * [Support Threads](https://wordpress.org/support/plugin/acf-to-custom-database-tables/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-to-custom-database-tables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-to-custom-database-tables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-to-custom-database-tables/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Pratham](https://wordpress.org/support/users/pratham2003/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/support-for-null-values/)
 * Status: not resolved