0

Wanted to create JSON field using Spring boot entity class in SQL Server. Below is the column name

@Column(name = "personalDetails", columnDefinition = "json")
@JsonRawValue
String personalDetails;

but I am getting the following error.

com.microsoft.sqlserver.jdbc.SQLServerException: Column, parameter, or variable #9: Cannot find data type json

1
  • 3
    JSON isn't a data type in SQL Server; the error is telling you the problem. If you want to store JSON data (in SQL Server), do so in an nvarchar(MAX). Commented Apr 19, 2021 at 9:25

1 Answer 1

1

JSON isn't a data type in SQL Server; the error is telling you the problem. If you want to store JSON data (in SQL Server), do so in an nvarchar(MAX).

Solved here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.