SQL: How to perform string does not equal

前端 未结 6 385
长发绾君心
长发绾君心 2020-12-22 20:34

I have the following query

SELECT * FROM table
WHERE tester <> \'username\';

I am expecting this to return all the results where test

6条回答
  •  时光说笑
    2020-12-22 20:54

    The strcomp function may be appropriate here (returns 0 when strings are identical):

     SELECT * from table WHERE Strcmp(user, testername) <> 0;
    

提交回复
热议问题