| | |
subtract 2 column value
Please support our Oracle advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2009
Posts: 5
Reputation:
Solved Threads: 0
hi
I have got a table for "internet access" with user ID, it has 3 columns user ID, starttime and endtime, i want to make another column which will show how many mins or hours that user was logged in to the internet and also add the total time if the user logged in more than once. can anyone please help me...
thanks
kaz
I have got a table for "internet access" with user ID, it has 3 columns user ID, starttime and endtime, i want to make another column which will show how many mins or hours that user was logged in to the internet and also add the total time if the user logged in more than once. can anyone please help me...
thanks
kaz
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
Hi debasisdas,
i also have the same problem and have a mysql table with two columns 'purchases' and 'sales' and would like to have another column 'balance' which is the result of subtracting purchases from sales. I am newbie to MySQL, would you kindly explain more about the simple subtract?
I highly appreciate your help and anyone out there with good ideas.
i also have the same problem and have a mysql table with two columns 'purchases' and 'sales' and would like to have another column 'balance' which is the result of subtracting purchases from sales. I am newbie to MySQL, would you kindly explain more about the simple subtract?
I highly appreciate your help and anyone out there with good ideas.
0
#4 Oct 6th, 2009
what you get when you try the following
Oracle Syntax (Toggle Plain Text)
SELECT purchase,sales,purchase-sales AS balance FROM table_name
Share your Knowledge.
![]() |
Similar Threads
- subtract to tables (MySQL)
- multi column data display (PHP)
- Addition with Two Dimensional Arrays (C++)
- Selection sort on 2 different arrays by one column (C++)
- Need help passing database column value to a string variable. (ASP.NET)
- order and then compare values from same column (Oracle)
- other col (C++)
- need urgent help for a query (MS SQL)
- PHP/SQL query help (PHP)
Other Threads in the Oracle Forum
- Previous Thread: Trouble with querying in Oracle using SQL
- Next Thread: trigger help pls....!!!!
Views: 2377 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for Oracle
2009predictions acquisition amazon.com bartz bernanke cia citrix cloudcomputing crm database dell economy editor enterprise enterprise2.0 enterprisesoftware erp federalreserve forbes hp ibm intellipedia internet larryellison layoffs linux loughridge mediawiki michaeljackson microsoft neverland nortel notebooks oil operatingsystem oracle palm rimm saas salesforce sap seagate socialcomputing sql sun sybase technologystocks virtualiron virtualization vmware wiki wikipedia xen yahoo zoho






