l ๐Ÿค– ์ฝ”๋“œ l

๊ธฐ์ƒ์ฒญ ๋‚ ์”จ api ๋ฐ›์•„์™€์„œ db์— ์ €์žฅํ•˜๊ธฐ (sql)

์ฝ”๋“œ๊ทธ๋ฆผ 2020. 5. 21.
๋ฐ˜์‘ํ˜•

ms-sql๋กœ ์ง  ์ฟผ๋ฆฌ์ž…๋‹ˆ๋‹ค.

 

//ํ”„๋กœ์ ํŠธ ํ†ต์œผ๋กœ ์˜ฌ๋ ค๋‘” ๊นƒํ—ˆ๋ธŒ ์ฃผ์†Œ์ž…๋‹ˆ๋‹ค.

๋‹ค๋ฅธ ๋‚ด์šฉ์ด ๊ถ๊ธˆํ•˜์‹œ๋‹ค๋ฉด ํ™•์ธ ํ•ด ์ฃผ์„ธ์š”.

github.com/Joowon0220/weather.git

 

CREATE TABLE WEATHER_API(
	INSERT_TIME DATETIME NOT NULL PRIMARY KEY,
	BASE_DATE CHAR(8) NOT NULL,
	BASE_TIME CHAR(4) NOT NULL,
	T3H CHAR(8),
	REH CHAR(8)
);

CREATE TABLE VILLAGE_WEATHER(
	INSERT_TIME DATETIME NOT NULL PRIMARY KEY,
	BASE_DATE CHAR(8) NOT NULL,
	BASE_TIME CHAR(4) NOT NULL,
	T3H CHAR(8),
	REH CHAR(8)
);

INSERT INTO village_weather VALUES(getDate(),'20020111','2300','00','20');

SELECT * FROM VILLAGE_WEATHER;

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€

๐Ÿ’ฒ ์ถ”์ฒœ ๊ธ€