Varchar(max) column not allowed to be a Primary Key in SQL Server.
What is the max length of a varchar type that can be made a primary key.
This might be a bad practice, but came across the situation.
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.
900 bytes is the max length for a primary key, this is a bad idea in my opinion, why don’t you use a surrogate key instead?