divide the value of a column by another column

Sheik Syed Mohaideen picture Sheik Syed Mohaideen · Nov 24, 2011 · Viewed 59.1k times · Source

I want to divide a value of a column by the value of another column and display the result as separate column

ex:

project name             total-percent        no.of screen
------------            --------------        -------------
pro-1                     150                     5
pro-2                      50                     3

now i want to divide total-percent by no.of screen and display the result in another column

Answer

Mahmoud Gamal picture Mahmoud Gamal · Nov 24, 2011
Select total_percent / no_of_scren as 'result' From yourTableName