Create data: insert()

Performs an INSERT into the table.

1final data = await supabase
2    .from('cities')
3    .insert({'name': 'The Shire', 'country_id': 554});

Examples#

Create a record#

1final data = await supabase
2    .from('cities')
3    .insert({'name': 'The Shire', 'country_id': 554});

Bulk create#

1final res = await supabase.from('cities').insert([
2  {'name': 'The Shire', 'country_id': 554},
3  {'name': 'Rohan', 'country_id': 555},
4]);