“PostgreSQL Casting entero a cadena” Código de respuesta

Postgres Convertir el número en cadena

Because the number can be up to 15 digits, you'll need to cast to an 64 bit (8-byte) integer. Try this:

SELECT * FROM table
WHERE myint = mytext::int8
The :: cast operator is historical but convenient. Postgres also conforms to the SQL standard syntax

myint = cast ( mytext as int8)
If you have literal text you want to compare with an int, cast the int to text:

SELECT * FROM table
WHERE myint::varchar(255) = mytext
Santino

PostgreSQL Casting entero a cadena

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

Respuestas similares a “PostgreSQL Casting entero a cadena”

Preguntas similares a “PostgreSQL Casting entero a cadena”

Más respuestas relacionadas con “PostgreSQL Casting entero a cadena” en Sql

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código