Fields are of type VARCHAR(8) . How can this field be compared with a string?

 select * from table WHERE postinfo = '12345678'; 

Where postinfo VARCHAR(8) does not work. Returns nothing.

  • Does it work like that? select * from table WHERE postinfo = cast ('12345678' as varchar (8)); And the value 12345678 is in the database? - msi

1 answer 1

 select count(*) from table WHERE postinfo = '12345678' and rownum = 1; 

If the strings are equal, then returns 1 . If not equal - 0 .