© 2026 Hedgehog Software, LLC

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

How to check if a column contains a given string (exactly)

I have a column with id's. I want to check if a given id is already in that column, how do i do that?
My current code is
const { data, error } = await supabase.from('my-table').select('id-column').contains('id-column', user_data.id);
const { data, error } = await supabase.from('my-table').select('id-column').contains('id-column', user_data.id);

This however, does not work.
Thanks!
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

checking if value in column (defined as array) contains given substring
SupabaseSSupabase / help-and-questions
4y ago
How to check if given OAuth provider is enabled?
SupabaseSSupabase / help-and-questions
13mo ago
RLS policy for insert to check given column value?
SupabaseSSupabase / help-and-questions
4y ago
Check if a value exists in a string?
SupabaseSSupabase / help-and-questions
4y ago