Hi,
I hope that the below SQL query will be very useful for you.
Let us consider the table old which maintains the history of the student record along with the datetime
The table test2 maintains the student record.
Query:
begin
Insert into old (SSN,Sname,Marksecured,[date]) select SSN,Sname,Marksecured ,GETDATE() from test2
update test2 set marksecured = 90 where ssn=1
end
Thanks & Regards
SakthiMeenakshi.S