I have the following SQL statement:
insert into [Order](UserId,MembershipType,PaymentAmt,PaymentStatus,StartDate,EndDate,Status)output INSERTED.OrderId values('18','Yearly','9.99','','2017-02-14 15:13:22','2018-02-14 15:13:22','1');Select Scope_Identity()
Which will insert the data in to my dbo.Order table in my Microsoft SQL Server 2014 database locally on my PC.
But when I run this query on a live 3rd party web server (With an identical database table) I get the following error:
exception=Cannot insert the value NULL into column 'OrderId', table 'db1128212_MYDATABASE.dbo.Order'; column does not allow nulls. INSERT fails.
Why is this?