生产环境,JAVA程序某功能报错:
ORA-00600: 内部错误代码, 参数: [qctcte1], [0], [], [], [], [], [], []
org.hibernate.exception.GenericJDBCException: ORA-00600: 内部错误代码, 参数: [qctcte1], [0], [], [], [], [], [], [], [], [], [], []
select count(*)
from (select a.ID_ as id, a.SOCIAL_ORGANIZATION_NAME as name, '社会组织' as type, a.CREATE_TIME, a.X as x, a.Y as y
from SOCIAL_ORGANIZATION a
where a.DEL_FLAG = 0
union all
select a.ID_ as id, a.LEGAL_REPRESENTATIVE_NAME as name, '非公有制经济组织' as type, a.CREATE_TIME, a.X as x, a.Y as y
from NPSOE_ORGANIZATION a
where a.DEL_FLAG = 0
ORDER BY CREATE_TIME DESC) G
根据官方对于ORA-00600 [qctcte1]的解释,出错原因有可能是ORDER BY 语句,
修改ORDER BY 中的排序列,将排序列放在最后一个字段,执行通过。
修改后SQL语句:
select count(*)
from (select a.ID_ as id, a.SOCIAL_ORGANIZATION_NAME as name, '社会组织' as type, a.X as x, a.Y as y, a.CREATE_TIME
from SOCIAL_ORGANIZATION a
where a.DEL_FLAG = 0
union all
select a.ID_ as id, a.LEGAL_REPRESENTATIVE_NAME as name, '非公有制经济组织' as type, a.X as x, a.Y as y, a.CREATE_TIME
from NPSOE_ORGANIZATION a
where a.DEL_FLAG = 0
ORDER BY CREATE_TIME DESC) G