tags:

views:

129

answers:

1

Quick question; is there a way to apply numeric type on select statement?

exmaple usage

select (t1.f_count / (select count(*) from utb where user_id = 1))*100 as ratio

i need this to returns 60 instead of 60.0000

A: 

try

select ROUND((t1.f_count / (select count(*) from utb where user_id = 1))*100) as ratio
Pomyk
missing a '(' after ROUND
Joshua
indeed, fixed now :)
Pomyk
thank you so much
ryan