Need help writing SQL for SQL Server.
The question is :
Question : If a student becomes a senior, you need to lower his/her maximum number of books to borrow from 4 (four) to 2 (two).
We have a student table. The student table contains a column called studentstatus which can hold the value of 0 or 1. 1 is for seniors and 0 is for juniors. We also have another column in the student table called Totalallowed int. Total allowed is the number of books that can be borrowed.
You just need to write a query to be able to lower the max books if the student is a senior.