שאלה ב-PLSQL

liron50

New member
שאלה ב-PLSQL

אני משתמש ב-ref cursor כדי לעבוד על רשומות. ומשום מה ה-rowcount שלו תמיד 0. הדפסתי את השאילתא שה-cusrsor מריץ כדי להריץ אותה בנפרד ולבדוק והדפסתי גם את ה- rowcount כדי לבדוק. השאילתא דווקא מחזירה רשומות, אבל בזמן ריצה הוא מדפיס שה - rowcount הוא 0. מישהו יודע למה זה קורה? האם זה משהו בסוג ה-cursor? או אולי משהו ב-oracle?
 

liron50

New member
OK, נראה לי שהבנתי את התשובה...

%ROWCOUNT Attribute: How Many Rows Affected So Far? %ROWCOUNT yields the number of rows affected by an INSERT, UPDATE, or DELETE statement, or returned by a SELECT INTO statement. %ROWCOUNT yields 0 if an INSERT, UPDATE, or DELETE statement affected no rows, or a SELECT INTO statement returned no rows. In Example 6-8, %ROWCOUNT returns the number of rows that have been deleted.
 
למעלה