[SQL] MSSQL Json 파싱하기
Json 형식으로 된 string 을 가지고 각각의 클래스 / 멤버 형태로 파싱하여 출력하기DECLARE @array VARCHAR(MAX) SET @array = '[{"month":"Jan", "temp":10},{"month":"Feb", "temp":12},{"month":"Mar", "temp":15}, {"month":"Apr", "temp":17},{"month":"May", "temp":23},{"month":"Jun", "temp":27} ]'; SELECT * FROM OPENJSON(@array) WITH ( month VARCHAR(3), temp int) A @array 변수에 month / temp 로 구성된 리스트 저장후 출력시 OPENJSON() 함수 사용 하여 파싱 후 출력..
더보기