Figured out the issue. Variable should not be the same as any column in the query. DECLARE HOSTID INT; declare cur1 cursor for SELECT itemid ...
確定! 回上一頁