Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: 无法将 NULL 插入
时间: 2023-10-19 19:25:16 浏览: 199
Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: 无法将 NULL 插入是指在向数据库插入数据时,违反了非空约束,即将 NULL 值插入了不允许为空的列中。 这通常发生在插入或更新数据时,对某个列进行了赋值为 NULL 的操作,而该列在数据库中被定义为不允许为空。这样的操作会触发数据库引发 SQLIntegrityConstraintViolationException 异常。这个异常信息中包含了具体的错误信息 ORA-01400。在这种情况下,你需要检查你的代码或者数据库表结构,确保在插入数据时不会将 NULL 值赋值给不允许为空的列。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [java.sql.SQLIntegrityConstraintViolationException](https://blog.csdn.net/zhao2chen3/article/details/122875564)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Cause: java.sql.SQLIntegrityConstraintViolationException: Column ‘businessName‘ cannot be null](https://blog.csdn.net/Silly011/article/details/119580160)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent row:](https://download.csdn.net/download/weixin_38500572/13684759)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文