8

I'm attempting to do the most basic WHERE statement in psql and I'm getting a strange error:

ERROR:  column "rom_tut" does not exist
LINE 1: SELECT * FROM pg_roles WHERE rolname="rom_tut";

Why is it complaining that the value isn't a column?

Danny Santos
  • 1,090
  • 2
  • 10
  • 30

1 Answers1

12

use single quote for string value because double quote means column name

SELECT * FROM pg_roles WHERE rolname='rom_tut'
Zaynul Abadin Tuhin
  • 31,407
  • 5
  • 33
  • 63