首页 > 编程 > Java > 正文

Java-获取操作数据库时违反的SQL约束全名

2019-11-06 07:17:21
字体:
来源:转载
供稿:网友
try { //导致异常的代码} catch (Exception e) { String errorMessageString = e.getMessage(); //对于唯一约束来说:约束全名为Owner.NAME String constraintNameString = com.linc.sys.util.Exception.SqlExceptionTool.getConstraintName(errorMessageString); }
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表