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
I know it's possible to make SQL query to insert like this, but is it possible in table settings?
That's not how autonumbers work. If you want to do something like this, you will have to calculate it yourself. But I have to caution you against this. I assume this is a teacher table and what you want to do is a bad idea because