How do I convert an integer to string as part of a PostgreSQL query?

后端 未结 3 1886
别跟我提以往
别跟我提以往 2020-12-13 03:19

How do I convert an integer to string as part of a PostgreSQL query?

So, for example, I need:

SELECT * FROM table WHERE  = \'stri         


        
3条回答
  •  北海茫月
    2020-12-13 03:59

    You could do this:

    SELECT * FROM table WHERE cast(YOUR_INTEGER_VALUE as varchar) = 'string of numbers'
    

提交回复
热议问题