Assuming ProductId is INT column, what is the difference between writing 3 and N’3′?
They both work fine.
INSERT INTO dbo.Products (ProductId, Name) VALUES (3,'Product3')
INSERT INTO dbo.Products (ProductId, Name) VALUES (N'3','Product3')
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
N'3'is anvarchartype, where3is anint. If you’re usingnvarcharyou’re asking the parser to perform implicit conversion. In this case it works fine but in others you may run into casting problems.