> For the complete documentation index, see [llms.txt](https://docs.schemajs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.schemajs.com/reference-guides/schemajs-global/insert.md).

# insert

The `insert` method in **SchemaJS** is a higher-level API that provides a convenient way to insert data into a database and table using the context provided by `globalThis.SJS_CONTEXT`. It ensures that the correct database and table are referenced from the context, offering a more user-friendly and streamlined way of inserting data compared to the lower-level [`rawInsert`](/reference-guides/schemajs-global/rawinsert.md) method. This method is designed to handle scenarios where the global context is already defined, making it easy to insert data without needing to explicitly specify the database or table every time.

```typescript
function insert(row: any);
```

```typescript
SchemaJS.insert({ id: "", book_name: "", ... })
```
