SQL 關聯式資料庫入門
Timo Grossenbacher
Data Journalist
引自 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;
SQL 關聯式資料庫入門