MySQL Forums
Forum List  »  Newbie

Re: addition within sql-command
Posted by: Andrew Gilfrin
Date: July 21, 2005 02:10PM

mysql> select * from table1;
+--------+
| field1 |
+--------+
| 1 |
+--------+
1 row in set (0.00 sec)

mysql> update table1 set field1 = field1 + 1;
Query OK, 1 row affected (0.25 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select * from table1;
+--------+
| field1 |
+--------+
| 2 |
+--------+
1 row in set (0.01 sec)

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote


Subject
Written By
Posted
Re: addition within sql-command
July 21, 2005 02:10PM


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.