I want to use OPENJSON
function in Azure SQL DB, but when I try to execute the function, I get the following error:
Msg 195, Level 15, State 10, Line 25 'OPENJSON' is not a recognized built-in function name.
I had researched and found this link saying
The OPENJSON function is available only under compatibility level 130 or higher. If your database compatibility level is lower than 130, SQL Server can't find and run the OPENJSON function. Other JSON functions are available at all compatibility levels.
As suggested, checked compatibility level with following
select * from sys.databases
and confirmed it was 140 which is higher than the minimum requirement.
So, wouldn't it it work?