To insert values into the identity column manually, I use:
SET identity_insert product ON INSERT INTO product (PID, ProdName, Qty, Unitprice) VALUES (10, 'soap', 5400, 22) Firstly I have deleted the 10th row/record, then I have used this command to insert the identity value and record it manually. this command is inserting the record. It's fine
Where should I write the command SET identity_insert product OFF? And what is the use of the SET identity_insert product OFF command?
GOsuggests an IDE like SSMS or ADS; which is normally used for SQL Server.SET IDENTITY_INSERTisn't a function. A function would be likeGETDATE()orISNULL(). As for how to use it, have you read the documentation? What about it didn't you understand, so we can try to elaborate.