我正在使用以下查询:
SELECT
CURRENT_AFFAIRS_ID,
IMPORTANT_EXAM
FROM CURRENT_AFFAIRS_LANGUAGE
WHERE CURRENT_AFFAIRS_ID IN (
1362544236,
1363764599,
1363670667,
1363516827,
1363500146)
AND IMPORTANT_EXAM IS NOT NULL
AND IS_ACTIVE = 1
AND IS_DELETED = 0
显示以下数据:
1363764599 Civil Services Exam, SSC Exams
1363670667 Bank Exams, SSC Exams
1363516827 Bank Exams, Civil Services Exam, SSC Exams
1363500146 Civil Services Exam, SSC Exams
我的要求是计算以逗号分隔的字符串的出现次数(例如公务员考试)
我试图通过java编码来做到这一点。
但这似乎太复杂的工作。
是否可以使用 oracle 或数据库端的任何功能?