ROW_COUNT() function
Posted by: John Vanderburg
Date: May 26, 2005 07:28AM

According to section 12.8.3 of the docs, "ROW_COUNT() returns the number of rows updated, inserted, or deleted by the preceding statement."

I get an error when I try to use it:

mysql> insert into DbLoad values (null,'X','X',0);
Query OK, 1 row affected (0.02 sec)

mysql> select ROW_COUNT();
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '()' at line 1

Version info:
mysql client Ver 14.7 Distrib 4.1.12, for pc-linux-gnu (i686) using readline 4.3
Server version: 4.1.10a-standard

What am I doing wrong?

Thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
ROW_COUNT() function
May 26, 2005 07:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.