12 lines
297 B
SQL
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');
|
|
|