SQL: How to perform string does not equal

前端 未结 6 415
长发绾君心
长发绾君心 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 21:00

    Another way of getting the results

    SELECT * from table WHERE SUBSTRING(tester, 1, 8)  <> 'username' or tester is null
    

提交回复
热议问题