Primary key is a unique key id in any relation.And there would be one and only one primary key in a relation.
If you want to enter duplicate value then you cannot set it as primary key, primary key is a unique key so either you should have it unique or dont declare it as a primary key
The whole purpose of the primary key is not to have duplicates and can't. You should be more specific in what you want to do. Why would you ever want multiple ID's of the same value?
If you want to add duplicate value in it, remove it as a primary key first. Go to the design view of your DMBS and delete the PK.
I will elaborate on the original question as I have the same which has not been answered. I want to have a 'primary key' field in my SQL database that may have duplicates. The reason I want it to be a primary key is that I believe doing so will allow me to rapidly access the relevant set of records from a large database in a real-time (as fast as possible, AFAP) data retrieval application. My database columns with data are: time data_id data 1000.1 7 xxx 1000.2 7 xxx 1000.3 7 xxx 1000.3 9 xxx 1000.4 7 xxx These data records arise from a science experiment that products many data samples (records) per second. The resulting database will be upto 20GB with 20 million records. The combination of time and data_id will always be unique. Time is always increasing, but there may be several data samples at the same time but ith different data_id. Reviewing the data will be done by plotting it in an real-time interactive manner. My display application will request samples between two times and display the data points. The request for the time range comes by sliding a scroll bars on the plot, all this needs to happen very rapidly (eg 0.1 seconds or less) Possibility given that the data always enters the data base in the order I want to retrieve it, nothing special is required to speed it up? Or possibly there is a lesser indexing specification that allows duplicates? Or possibly I combine time and data_id, make it a primary key, and search using only a portion of the key? eg: time_data_id: 1000.1_7 1000.2_7 1000.3_7 1000.3_9 1000.4_7 Thank you. Chris
Yes, it is possible to do. For this you just need to disable the constraints. Then you can enter any desired value.