---
updatedAt: 2026-06-22T20:31:09.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# eq

```
eq(a: storable or link, b: storable or link) -> bool
```

Return true if A is equal to B. The function follows [ternary
logic](https://en.wikipedia.org/wiki/Three-valued_logic) and returns `null` if
any of its inputs is `null`. To compare values that can potentially be `null`,
consider using the [same](function-same) function.

# Domain

This is a scalar function (calculates a single output value for a single input row).

# Categories

* [Boolean](function#boolean-functions)

# Examples

<OpalCodeBlock code={
`make_col foo:eq(bar, baz)
`}/>

This produces a column named `foo` comparing `bar` and and `baz`. If `bar` is 1 and `baz` is 1, `foo` is true. If `bar` is 1 and `baz` is 0, `foo` is false. If `bar` is 1 and `baz` is null, `foo` is null.