有没有简单的方法可以根据条件删除表的非空约束
如果 mty.bty_tp = GA 且 mty.geal_conds_vion_num 如 %36%,则应禁用各个表中的强制输入(非空约束)。
它涉及以下表格
· tbt_con.entry_dat
· tbt__texts
· tbt_amounts
· tbmt_currencies
If mty.bty_tp = GA and mty.geal_conds_vion_num like %36% then the mandatory input(not null constraints) in various tables should disabled.
It concerns the following tables
· tbt_con.entry_dat
· tbt__texts
· tbt_amounts
· tbmt_currencies
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能这样做,没有条件地作为约束(“按原样”)。
为了强制执行这一点,您需要
我猜第一个选项是“更安全”,因为您不必事后关心它 - 数据库将防止无效插入。
它还意味着这些表中的列不应被创建为
NOT NULL
。You can't do that, not conditionally as a constraint ("as is").
In order to enforce that, you'll need to either
I guess that the 1st option is "safer" as you don't have to take care about it afterwards - database will prevent invalid inserts.
It also means that columns in those tables should NOT be created as
NOT NULL
.