Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I just ran a rather simple insert statement (that I think processed alot of rows), and I got the message: "-1,311,750,183 rows inserted". Should I be concerned about the fact that it's negative?

share|improve this question
1  
Which DBMS are you using? –  ypercube Jul 11 '13 at 21:02
    
I smell 32-bit DB software. –  RolandoMySQLDBA Jul 11 '13 at 21:10
    
SQL Developer. How can I check if I'm using 32 or 64 bit? –  Josh Browning Jul 12 '13 at 10:58
    
SELECT * FROM V$VERSION –  msi77 Jul 12 '13 at 16:06
    
Nope, it's 64 bit: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production "CORE 11.2.0.2.0 Production" TNS for Linux: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production –  Josh Browning Jul 14 '13 at 11:43
add comment

1 Answer

up vote 4 down vote accepted

It is possible that the number of rows exceed the value of PLS_INTEGER. Here is the quote from Oracle on %ROWCOUNT.

%ROWCOUNT Attribute: How Many Rows Were Fetched? %ROWCOUNT returns: Zero after the explicit cursor is opened but before the first fetch Otherwise, the number of rows fetched (a PLS_INTEGER) Note: If the number of rows exceeds the maximum value for a PLS_INTEGER, then SQL%ROWCOUNT returns a negative value. For information about PLS_INTEGER, see "PLS_INTEGER and BINARY_INTEGER Data Types".

share|improve this answer
    
Ah, ok, thanks! –  Josh Browning Jul 24 '13 at 16:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.