I created a table named STUDENT. It has the following columns:
- Id
- Name
- Surname
- DateOfBirth
- DateOfAdmission
- DateOfPassout
This table have following primary key:
- Id
- Name
- Surname
- DateOfAdmission
Do I need to create an index another index of column Id, Name if want to query this table providing input just Id and Name?
Idshould be the primary key (I presume it is always unique). Understand that if your primary key really does consist of four columns, you will end up with a lot of columns in other tables for foreign key constraints.