© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
15 replies
★𝒄𝒍𝒂𝒊𝒓𝒆★

Check if something exists in table, If not make it

Im wanting check if a discord users ID is in my table by using (code below).
const { data, error } = await supabase
      .from('test')
      .select()
      .eq('uuid', interactionAuthorID.toString());
const { data, error } = await supabase
      .from('test')
      .select()
      .eq('uuid', interactionAuthorID.toString());

But when there is nothing found data is set to
[]
[]
and error is
null
null
, am I supposed to be doing this another way? I was thinking if I got an error of something along the lines of 'data does not exist in the table' then I could then create the data.
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

Check if a value exists in a string?
SupabaseSSupabase / help-and-questions
4y ago
Check if row already exists with RLS.
SupabaseSSupabase / help-and-questions
4y ago
Table exists but function says not found
SupabaseSSupabase / help-and-questions
8mo ago
how to check if user exists only with Google OAuth?
SupabaseSSupabase / help-and-questions
4y ago