---
title: Ditto Query Language Overview
slug: dql
docTags: 
createdAt: 2024-08-01T00:58:18.707Z
---

Ditto Query Language (DQL) is a powerful, flexible query language designed specifically for use with the Ditto platform. It allows you to perform complex data operations with ease, enabling real-time synchronization and efficient data management.

DQL is designed to simplify data interactions in your applications, providing a consistent and intuitive interface for querying and manipulating data. Whether you're a developer looking to streamline your backend operations or an engineer focused on optimizing data flow, DQL is tailored to meet your needs.

# DQL Quick Reference

## [SELECT](docId\:iMDPwvQgVj4yyV5RalGbi)

:::CodeblockTabs
DQL

```sql
SELECT *
FROM your_collection_name
[WHERE condition]
[ORDER BY orderby_expression_1, orderby_expression_2, ... [ASC|DESC]]
[LIMIT limit_value]
[OFFSET number_of_documents_to_skip]
```
:::

## [INSERT](docId\:EMhcouL5Kbus5z05x_pKu)

:::CodeblockTabs
DQL

```sql
INSERT INTO your_collection_name
DOCUMENTS ([document1]),([document2]), ([document3]), ...
[ON ID CONFLICT [FAIL | DO NOTHING | DO UPDATE]]
```
:::

## [UPDATE](docId:_vxfd7_jJFfTzByIVqoxh)

:::CodeblockTabs
DQL

```sql
UPDATE your_collection_name
SET field1 = value1, field2 -> [mutator], ...
WHERE [condition]
```
:::

## [EVICT](docId\:ksPbI9CsHPdud0iyuow9E)

:::CodeblockTabs
DQL

```sql
EVICT FROM your_collection_name
WHERE [condition]
```
:::

:::hint{type="info"}
To learn the intricacies of read-and-write operations, see [CREATE](docId\:VQ-hkrsKGjsClXYB_PxV7), [READ](docId:-hDJl44tBGP3cPWVbXXJ7), [UPDATE](docId\:LIuprvsTd4Fs75_E3jI3K), and [DELETE](docId:2iXFV6yFQiKjroBx0cUjd).
:::

