# Is it possible to insert multiple records at a time in aerospike server through a single query?

**URL:** <https://discuss.aerospike.com/t/is-it-possible-to-insert-multiple-records-at-a-time-in-aerospike-server-through-a-single-query/10332>\
**Category:** AQL\
**Tags:** query\
**Created:** [July 17, 2023, 11:30am UTC](https://discuss.aerospike.com/t/is-it-possible-to-insert-multiple-records-at-a-time-in-aerospike-server-through-a-single-query/10332 "2023-07-17T11:30:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://discuss.aerospike.com/u/sagar)\
**Post date:** [July 17, 2023, 11:30am UTC](https://discuss.aerospike.com/t/is-it-possible-to-insert-multiple-records-at-a-time-in-aerospike-server-through-a-single-query/10332/1 "2023-07-17T11:30:30Z")

</div>

I want to insert multiple records at a time by using a single query just like we are doing in SQL.is it possible in aerospike or not?

---

<div class="post-metadata">

**Author:** ![meher](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/meher/32/1644_2.png) [@meher](https://discuss.aerospike.com/u/meher)\
**Post date:** [July 17, 2023, 10:10pm UTC](https://discuss.aerospike.com/t/is-it-possible-to-insert-multiple-records-at-a-time-in-aerospike-server-through-a-single-query/10332/2 "2023-07-17T22:10:30Z")

</div>

You can insert/update multiple records as part of a call using the Batch API (see this doc page: [Batch Operations | Aerospike Documentation](https://docs.aerospike.com/server/guide/batch#batch-writes)).

Here is a tutorial that walks through some examples: [Aerospike Interactive Tutorial: Batch Operations in Aerospike | Developer](https://developer.aerospike.com/tutorials/java/batch_ops#new-batch-capabilities).

I am not sure how similar it is to what SQL allows, though…

Hope this helps.

---

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://discuss.aerospike.com/u/sagar)\
**Post date:** [July 18, 2023, 5:14am UTC](https://discuss.aerospike.com/t/is-it-possible-to-insert-multiple-records-at-a-time-in-aerospike-server-through-a-single-query/10332/3 "2023-07-18T05:14:56Z")

</div>

Thanks @meher for the input.
