拼接语句: SELECT 'alter system kill session '''||SID || ',' || SERIAL#||''';' FROM V$SESSION WHERE SID in (SELECT SESSION_ID FROM V$LOCKED_OBJECT, USER_OBJECTS WHERE V$LOCKED_OBJECT.OBJECT_ID = USER_OBJECTS.OBJECT_ID); 显示结果: alter system kill session '45,144'; alter system kill session '54,4748'; alter system kill session '55,11321'; alter system kill session '56,12470'; alter system kill session '58,595'; alter system kill session '67,13872'; alter system kill session '70,21882'; alter system kill session '73,7612'; alter system kill session '75,421'; alter system kill session '80,2878'; alter system kill session '85,1094'; alter system kill session '86,3293'; alter system kill session '97,9092'; alter system kill session '103,3420'; alter system kill session '108,8066'; alter system kill session '124,11495'; alter system kill session '139,3214'; alter system kill session '140,12659'; alter system kill session '142,15801'; alter system kill session '146,28143';