第1个回答 推荐于2018-03-01
看看这个类的文档就明白了,是说主键或唯一键约束失败时会抛出的异常:
Exception thrown when an attempt to insert or update data results in violation of an primary key or unique constraint. Note that this is not necessarily a purely relational concept; unique primary keys are required by most database types.本回答被提问者和网友采纳