1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Checking Inequality as a postgres til

This commit is contained in:
jbranchaud
2016-09-10 12:15:56 -05:00
parent 8940ae0469
commit c6e6353208
2 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
# Checking Inequality
In most languages there is a `!=` operator for checking inequality of two
things.
Postgres also supports the synonymous `<>` operator for checking inequality.
```sql
> select 1 <> 1;
?column?
----------
f
> select true <> false;
?column?
----------
t
> select 'taco' <> 'burrito';
?column?
----------
t
```
h/t Brian Dunn
[source](https://www.postgresql.org/docs/9.5/static/functions-comparison.html)