Primary key without primary key

0

I know it is not good practice and should not do so, but it comes in modeling and where the captain does not rule sailor, I need to know if in SQL Server it is possible to make a composite foreign key without having a primary key in the table, only referring to the primary keys of the other tables.

I need to make the PRESCRIPTIONS table, but it does not have a primary key and I do not understand how to make the composite foreign key.

    
asked by RAYCEN 24.05.2018 в 21:34
source

1 answer

0

From what I see, you are seeing the table wrong if you have a unique id and the foreign keys are from the other tables, it is not composed, that is, a foreign key for each table that is related.

As this is fine, you are facilitated to make the tables in the DB diagram of sql-server.

    
answered by 25.05.2018 в 00:54