user2628788 user2628788 - 4 years ago 76
SQL Question

SQL - just view the description for explanation

I would like to ask if it is possible to do this:

For example the search string is '009' -> (consider the digits as string)

is it possible to have a query that will return any occurrences of this on the database not considering the order.

for this example it will return

'009'
'090'
'900'

given these exists on the database. thanks!!!!

Answer Source

Use the Like operator.

For Example :-

SELECT Marks FROM Report WHERE Marks LIKE '%009%' OR '%090%' OR '%900%'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download