1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 15:18:01 +00:00
Files
til/postgres/checking-inequality.md
2016-09-10 12:15:56 -05:00

28 lines
436 B
Markdown

# 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)