List:General Discussion« Previous MessageNext Message »
From:Ali A.F.N Date:October 21 2010 1:57pm
Subject:Percent of match in condition
View as plain text  
Hi All,

I have a table with different fileds and almost the type of all them are 
smallint. I want to search on some fields with "OR" condition. I want to know is 
there possibility to know how many fileds matched exactly? then I can say how 
many percent match are available.

select * from my_table where sex_id = 1 or country_id = 120 or education_id

I mean if in my table there are some records with sex_id = 1 or country_id
120  then I got 2 (2 match) then I can say 66% percent match.

Thank you,


Percent of match in conditionAli A.F.N22 Oct
  • Re: Percent of match in conditionJohan De Meersman22 Oct
  • Re: Percent of match in conditionMySQL)22 Oct
  • RE: Percent of match in conditionTravis Ard22 Oct