© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
Shafiq

Return data from insert()?

const { data, error } = await supabase
.from('users')
.insert([
{ some_column: 'someValue' },
{ some_column: 'otherValue' },
])

does the method above actually return data? if so how come im getting undefined for that data after calling the function. Am i missing something?

NOTE: I tried both insert() and upsert(), I also tried to pass upsert as a parameter to insert()
NOTE: the data is being added to the table with no issues.
Screenshot_2022-08-30_193929.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Return data on insert
SupabaseSSupabase / help-and-questions
4y ago
Bulk Insert RPC to return inserted values.
SupabaseSSupabase / help-and-questions
4y ago
Insert method, can't insert data
SupabaseSSupabase / help-and-questions
4y ago
RPC anon insert return ID
SupabaseSSupabase / help-and-questions
4y ago