Introducción a las bases de datos relacionales en SQL
Timo Grossenbacher
Data Journalist
De la documentación de PostgreSQL.
CREATE TABLE weather ( temperature integer, wind_speed text);SELECT temperature * wind_speed AS wind_chill FROM weather;
operator does not exist: integer * text
HINT: No operator matches the given name and argument type(s).
You might need to add explicit type casts.
SELECT temperature * CAST(wind_speed AS integer) AS wind_chill
FROM weather;
Introducción a las bases de datos relacionales en SQL