Greetings, I'm doing an SQL query. The column to which I apply the WHERE condition is of type character varying, but the data with which I complete the condition is an integer.
SELECT * FROM tablaCodigo WHERE codigo = 123
Getting the following message:
No operator matches the given name and argument type(s). You might need to add explicit type casts.
I know I have to do a cast on 123 to be taken as character varying. What is the correct way to do it? thanks