zkt25/assignment2/init-db.sql
2025-05-11 00:01:27 +02:00

12 lines
297 B
SQL

CREATE TABLE IF NOT EXISTS weather_log (
id SERIAL PRIMARY KEY,
city VARCHAR(100),
temperature DECIMAL(5,2),
description TEXT,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO weather_log (city, temperature, description)
VALUES ('London', 15.5, 'partly cloudy');