Reputation: 13
What im looking for is I have 2 words e.g. 'Family' and 'Family Tree'
then I would love to know that how much does both texts match to each others.
let say 'Family' and 'Family' >> 100 %
not sure any workaround or not.
Thank you so much.
Upvotes: 1
Views: 2016
Reputation: 141730
For presto you can try looking into levenshtein_distance(string1, string2) → bigint
built in function:
Returns the Levenshtein edit distance of
string1
andstring2
, i.e. the minimum number of single-character edits (insertions, deletions or substitutions) needed to changestring1
intostring2
.
Or (though it seems less suitable) hamming_distance(string1, string2) → bigint
:
Returns the Hamming distance of
string1
andstring2
, i.e. the number of positions at which the corresponding characters are different. Note that the two strings must have the same length.
Upvotes: 0
Reputation: 612
you can use like.
select * from tablename where fildname like '%Family%'
Result Give you all row in keyword is Family present.
Upvotes: 0