Is it possible to create a table where two columns represent a primary key and one of them is autonumber but not distinct. Something like (teacherID,schoolID(FK),teacherName) where first two are primary key and first one is autonumber. When teachers from different schools are inserted the teacherID autoincrement should depend from school.
Example for insertion
- 1, 1, Steven
- 2, 1, Leslie
- 1, 2, Maria
I know it's possible to make SQL query to insert like this, but is it possible in table settings?