定义游标前判断游标是否存在,若存在则销毁该游标
if(CURSOR_STATUS('global','innerCursor')!=-3) begin deallocate innerCursor end