skip to Main Content

Every solution I see has to do with people having case sensitive column names.

The query select * from users works, but when I say select * from users where username=maxspiri, I get error column maxspiri doesn’t exist. Here is my table:

enter image description here

2

Answers


  1. Since maxspiri is a string, you need to wrap it in single quotes.

    select * from users where username='maxspiri'
    
    Login or Signup to reply.
  2. For anyone else looking into this:

    Column names in Supabase should be wrapped in double quotes, but strings (values) should be wrapped in single quotes:

    SELECT "id" from "table" WHERE "name" = 'some string value'
    

    If your table, or column, has an uppercase in it (e.g. tableName) and if you don’t wrap it in double quotes (e.g. "tableName") Supabase will convert it to lower case (e.g. tablename) and it won’t find such table/column.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search