Join Discord
Powered by
Hi. How to delete all rows from table? when i try ...
# help
w
whoisYeshua
03/07/2022, 2:57 PM
Hi. How to delete all rows from table? when i try
Copy code
js await supabase.from('talbe_name').delete()
i got error
DELETE requires a WHERE clause
s
Scott P
03/07/2022, 3:10 PM
Delete all
g
garyaustin
03/07/2022, 3:13 PM
Supabase added an extension to keep people from accidentally deleting all rows by forgetting a filter. Just use a filter that will always be true. Something like .neq('id',0) or anything that will never match.
w
whoisYeshua
03/08/2022, 12:15 PM
Thank you🥰
Previous
Next