• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1268
  • Last Modified:

mysql select limit only integer

balanceborow.amout*.02 AS Interrest    the out put is   800.2000  or 450.0200    how can  I set the out put is interger    800.20 should be 801   or 450.0200 should be  451


SELECT balanceborow.wid, balanceborow.wname, balanceborow.amout,  balanceborow.amout*.02 AS Interrest, balanceborow.DateBalance, balanceborow.amout
FROM balanceborow
WHERE balanceborow.wid =' $AccNo'
0
teera
Asked:
teera
1 Solution
 
Ashish PatelCommented:
Try this

SELECT balanceborow.wid, balanceborow.wname, balanceborow.amout,  CEILING(balanceborow.amout*.02) AS Interrest, balanceborow.DateBalance, balanceborow.amout
FROM balanceborow
WHERE balanceborow.wid =' $AccNo'
0
 
scorpiiaCommented:
you can use CAST
CAST(Interest As INT)
use select to check the result
select CAST (Interest AS INT)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now