SQL中的<>"〜"是什么意思

cof*_*cus 0 sql stored-procedures tilde

我有一个SP,其中一部分说明:

    AND t_phlcm.VAT_FG  <>  "~"
Run Code Online (Sandbox Code Playgroud)

你能解释<>"〜"部分吗?tilde(〜)在SQL中是否具有特殊含义,如%?

Ash*_*aur 11

这是一个简单的字符串比较的例子 t_phlcm.VAT_FG must not be equal to "~" character.

虽然~可以在Postgres中使用正则表达式,如下所示:

SELECT * FROM table where name ~ '^ABC'

并且更强大,但不建议喜欢LIKE(~~)更快.请参考这个

一般来说~,用于补充整数或位,如下所示:

Update Users Set [Status] = ~[Status] 将反转所有用户的状态.