MySQL Forums
Forum List  »  Newbie

Re: calculations
Posted by: Andrew Gilfrin
Date: July 25, 2005 03:35PM

create table pay (basic numeric(13,2), bonus numeric(13,2));

insert into pay values (100.00, 50.00);

select basic, bonus, basic + bonus as total from pay;

+--------+-------+--------+
| basic | bonus | total |
+--------+-------+--------+
| 100.00 | 50.00 | 150.00 |
+--------+-------+--------+
1 row in set (0.27 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
July 25, 2005 01:43PM
Re: calculations
July 25, 2005 03:35PM


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.