---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ytsaurus.tech/docs/en/yql/syntax/discard.md
  - https://ytsaurus.tech/docs/ru/yql/syntax/discard.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ytsaurus.tech/docs/en/llms.txt

# DISCARD

Calculates [SELECT](https://ytsaurus.tech/docs/en/yql/syntax/select/index.md), [REDUCE](https://ytsaurus.tech/docs/en/yql/syntax/reduce.md) or [PROCESS](https://ytsaurus.tech/docs/en/yql/syntax/process.md), but returns no result to the client or to the table. It can't be set at the same time as [INTO RESULT](https://ytsaurus.tech/docs/en/yql/syntax/into_result.md).

It's good to combine it with `Ensure` to check the final calculation result against the user's criteria.

#### Examples

```yql
DISCARD SELECT 1;
```

```yql
INSERT INTO result_table WITH TRUNCATE
SELECT * FROM
my_table
WHERE value % 2 == 0;

COMMIT;

DISCARD SELECT Ensure(
    0, -- will discard result anyway
    COUNT(*) > 1000,
    "Too small result table, got only " || CAST(COUNT(*) AS String) || " rows"
) FROM result_table;
```
