Skip to content
Oxford Harrison edited this page Nov 13, 2024 · 12 revisions

DOCSLANG


The INSERT statement.

See APIS ➞ client.query(), table.insert()

Basic Insert

// (a): SQL syntax
const result = await client.query(
    `INSERT TABLE public.users
        (name, email)
    VALUES ('Jane', '[email protected]')`
);
// (b): Object-based syntax
const result = await client.database('public').table('users').insert(
    { name: 'Jane', email: '[email protected]' }
);

Multi-Dimensional Inserts

See also ➞ Magic Paths

Clone this wiki locally