SQL searching two columns for best results

Posted by brsmnc on Stack Overflow See other posts from Stack Overflow or by brsmnc
Published on 2010-05-23T16:33:52Z Indexed on 2010/05/23 17:01 UTC
Read the original article Hit count: 132

Filed under:

Hi all

I would like to perform an sql search and I would like to get best results. I tried some things but they didn't work well. I have got two columns named subject and content

For example we will search "search this keywords" text on subject and content area. First I'm searching "search this keywords" then searching "search" and "this" and "keywords"

I would like to retrieve subject's results on top and I would like to retrieve best results liking "search this keywords".My query sometimes works well sometimes not.

How should I write this query

Thanks..

© Stack Overflow or respective owner

Related posts about sql