Sometimes it happens that I don't have data, so I want that a numeric field gets 'NA' instead of 0.
In fact, 0 (zero) have meaning in my table, so it must be 'NA' in those cases.
This default in numeric fields are defined on constraints in your SGBD (eg. SQL Server).
The default constraint will put 0 on database, without that will be save with "NULL".
So for do that you will need to remove the constraint or redefine that with the value that you need.
Note: Always when you rebuilding the database schema or install a new version of your software the constraint will be rebuilt and you will have to remove that.
About the Community
|Asked: 11/21/19, 11:52 AM|
|Seen: 1304 times|
|Last updated: 11/29/19, 12:10 PM|