> For the complete documentation index, see [llms.txt](https://help.besmart.software/erpc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.besmart.software/erpc/data-interface-reference-manual/importing-data-into-a-vault/writing-data-into-data-interface/using-sql-syntax.md).

# Using SQL syntax

Using SQL syntax

```sql
DECLARE @result TABLE ( bid bigint, rid bigint );
INSERT INTO EcENTITY (comm_dir, bulk_id, ent_class_id, name)
OUTPUT INSERTED.bulk_id, INSERTED.ID INTO @result
VALUES ( 1, ISNULL((SELECT MAX(bulk_id) FROM EcENTITY), 0) + 1, N'ITEM', N'ARTKL-10001');
SELECT * FROM @result;
```
