Search code examples
sqlregexdb2sql-like

Can we use "NOT LIKE " in sql


Can we use "NOT LIKE '%abc%'" just opposite of LIKE '%abc%' ? i tried and got some result but dont look like correct!!

Is there anything similar to regex in SQL.

Eg:

i hae a table with 3 field.

id  name  address
1    xyz    1234 abcd 
2    abc    nomans land
3    omg    #123 new-york
3    nom    $123 &7up

can i fetch the address **with special characters with out checking each special character one by one . How


Solution

  • Sure, look here. Also NOT LIKE is supported.