Hi All,
Pleasse help to understand when to use
when to use notnull=true and notnull=false in schema definition
and if we put notnull=true ,what is the difference it make and if we put notnull=false what will hapeen on that particualr field
<attribute desc="CSLS_SourceTimestamp" label="CSLS_SourceTimestamp" name="CSLS_SourceTimestamp"
notNull="false" sqlname="CSLS_SourceTimestamp" type="datetime"/>
,@isahore ,@AndreaBriceno,@ParthaSarathy
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @DishaSharma ,
If we give notNull="false", it will not allow null values in that Particular column where as if we give notNull="true", it will allow null values in that particular column where we defined.
Generally we need to define all the Integer columns so that it wont allow NULL Values instead '0' should be populated , and for string Datatypes the Null values can be allowed.
Also for this use case:
<attribute desc="CSLS_SourceTimestamp" label="CSLS_SourceTimestamp" name="CSLS_SourceTimestamp"
notNull="false" sqlname="CSLS_SourceTimestamp" type="datetime"/>
It will not allow null values as for the attribute "CSLS_SourceTimestamp" the notNull="false" is defined.
You can test it by inserting a record without any value in Datetime field.
Also please refer to the below solved post
Regards,
Pravallika.
Hi @DishaSharma ,
If we give notNull="false", it will not allow null values in that Particular column where as if we give notNull="true", it will allow null values in that particular column where we defined.
Generally we need to define all the Integer columns so that it wont allow NULL Values instead '0' should be populated , and for string Datatypes the Null values can be allowed.
Also for this use case:
<attribute desc="CSLS_SourceTimestamp" label="CSLS_SourceTimestamp" name="CSLS_SourceTimestamp"
notNull="false" sqlname="CSLS_SourceTimestamp" type="datetime"/>
It will not allow null values as for the attribute "CSLS_SourceTimestamp" the notNull="false" is defined.
You can test it by inserting a record without any value in Datetime field.
Also please refer to the below solved post
Regards,
Pravallika.