i have a a table in database saving in it a lot of data and i design this table to be from the Id 500 to 1000 is for teacher names for example and from 1001 to 2000 for student names.
Now, i want to make a stored procedure to add new teacher , how can i tell him go to this interval and get the last id of it and insert after it???
Can any One helps me in it, please????????