select name,(Cashincome+transaction_income) as Income from TableA;

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 5:04 PM
Subject: Asking help about SQL(Select)


Dear All,
  Sorry for bothering everyone.
  I am just working with MySQL but I have faced a problem:

I have a table with following problems:

TableA with following columns:
Name                    Cashincome             transaction_income

I cannot change the form of table.
If i wanna to have such output: (either cashincome or transaction_income
will be filled, they will not be filled at the same time)
Name                      Incomes

which contain all data. How can I do this?

e.g.
Name                       Cashincome        Transaction_income
RecordA                    1234.00
RecordB                                                    2230.00

Output
Name                        Income
RecordA                    1234.00
RecordB                    2230.00

Sorry for any incovenience caused.
Thanks anyway.

Yours sincerely,
Jason Chan
(Please reply to [EMAIL PROTECTED] or [EMAIL PROTECTED])




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to