Home > Back-end >  Questions about the query submitted to default values
Questions about the query submitted to default values

Time:12-09

1 with oadc connecting oracle database to add and delete operations, oralce has two fields in the table is to use the default values, two is
Id is: by default get_guid () is not empty value
Operdate default is: sysdate non-null value
In the query - & gt; Adppend, these two values default is not complete, because it generates can in database, at the time of post (), will tip:
Field id must hava a value, can you tell me how to solve this problem,
2 about the database use function to obtain the default value in the field, how to append increasing or batch, is how to obtain the query?

CodePudding user response:

Id and operdate not null values, new must determine an appropriate value for it, otherwise, the error,

CodePudding user response:

In the database field has a default value, it is best not to participate in APPEND, if don't want to participate in, must assign a value, or POST is wrong,
In general, has a default value data update, it is best to use structured SQL INSERT to transaction control, to ensure data security
  • Related