locked
Store JSON documents in SQL Server 2017 RRS feed

  • Question

  • Hi, I am using SQL Server 2017 and trying to figure out if json documents could be stored in a table.

    Table:

    create table dbo.Log (
        id int primary key identity,
        log nvarchar(max)
    );

    JSON:

    [
    {"LogDate":"2007-07-14T12:45:11.703",
    "UpdatedDate":"2008-04-01T14:42:31.453",
    "Text":  "This is text 1"},
    {"LogDate":"2007-07-14T12:45:11.705",
    "UpdatedDate":"2008-04-01T14:42:31.456"
    "Text":  "This is text 2"}
    ]

    I would like to store the json document in column log of the table dbo.Log. Does SQL Server 2017 support storing json documents?

    Thank you.


    SQLEnthusiast

    Monday, July 27, 2020 6:08 PM

Answers

All replies