Monday, March 12, 2012

Primary ID = BC

A column will be Primary Key. Others are B and C. I want A will contain B and C. I mean B data is X, C data is Y, A will be XY. How can i do this? Can i set in MSSQL or need ASP.NET?If I am following you correctly what you are referring to is called a "composite key". You can easily set this in SQL Server by specifying 2 columns instead of 1 as the primary key.

I don't use composite keys myself (I use surrogate keys instead) so I can't offer too much advice on how to handle this in your ADO.NET code.

Terri

No comments:

Post a Comment