5
I know that SQL Server has the Primary Keys and start not to allow duplicate records, but it is possible to do this through 2 columns or more?
As an example, I have a table with column, house and dog, where the records can repeat the houses and also the dogs, but can not repeat the same house with the same dog.
INSERT INTO table VALUES ('Laranja', 'Rex') << OK
INSERT INTO table VALUES ('Azul', 'Rex') << OK
INSERT INTO table VALUES ('Laranja', 'Tob') << OK
INSERT INTO table VALUES ('Azul', 'Tob') << OK
INSERT INTO table VALUES ('Laranja', 'Rex') << ERRO - DUPLICIDADE
It is possible to do this only by table creation?