There is a table:
ID Name Rank
1 X Professor
2 X Principal
3 X Term Prof
4 X assistant
What I want is want to write the stored procedure to select the last professor rank or assistant rank depending on the input. Here is the format of the stored proc:
create procedure proc_name(@includeassistant varchar(3))
end
if includeassistant is "yes" then assistant then the last row must be displayed if include assistant is no then Term prof row must be given.