Can we define a string and a number both as a primary Key in table?
Share
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.
Yes. But depending on the RDBMS I wouldn’t necessarily do that.
Instead create a surrogate primary key, and a unique compound key based on your domain values (string and number)