# How do I append/add data in JuliaDB table?

**URL:** <https://discourse.julialang.org/t/how-do-i-append-add-data-in-juliadb-table/20401>\
**Category:** New to Julia\
**Tags:** juliadb\
**Created:** [February 3, 2019, 2:20pm UTC](https://discourse.julialang.org/t/how-do-i-append-add-data-in-juliadb-table/20401 "2019-02-03T14:20:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elmer\_Cusipuma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elmer_cusipuma/32/11958_2.png) [@Elmer\_Cusipuma](https://discourse.julialang.org/u/Elmer_Cusipuma)\
**Post date:** [February 3, 2019, 2:20pm UTC](https://discourse.julialang.org/t/how-do-i-append-add-data-in-juliadb-table/20401/1 "2019-02-03T14:20:17Z")

</div>

I am trying to append arrays to a table JuliaDB

```julia
using JuliaDB
t = table([], [], names=[:x, :y]);

```

I tried to do that by the following command

```julia
push!(rows(t), (x = 5, y = 9))

```

but I want something like:

```julia
d1 = [5,6,7];
d2 = [9,2,8];
push!(rows(t), (x = d1, y = d2))

```

Obviously these vectors will be huge, but for simplicity I just put this limited size.

---

<div class="post-metadata">

**Author:** ![joshday](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joshday/32/368_2.png) [@joshday](https://discourse.julialang.org/u/joshday)\
**Post date:** [February 4, 2019, 9:01pm UTC](https://discourse.julialang.org/t/how-do-i-append-add-data-in-juliadb-table/20401/2 "2019-02-04T21:01:57Z")

</div>

In that case you’d want `append!`:

```julia
julia> t = table(Int[], Int[], names=[:x, :y])
Table with 0 rows, 2 columns:
x y
────

julia> append!(rows(t), (x=[1,2,3], y=[4,5,6]));

julia> t
Table with 3 rows, 2 columns:
x y
────
1 4
2 5
3 6

```

WARNING: JuliaDB doesn’t check that the sorting of your primary key(s) are still valid here. If you have a primary key, use [`merge`](http://juliadb.org/latest/api/#Base.merge-Tuple%7BUnion%7BIndexedTable,%20NDSparse%7D,Any%7D) with two tables
