问题描述
将游标teacher_cursor中倒数第二行的教师姓名改为“张三”,职称改为“教授”。
解决方案
解决方案二:
结帖率:0.00%
解决方案三:
DECLARE@tidchar(20),@tnamechar(20),@tpossionchar(20)OPENteacher_cursorFETCHLASTRELATIVE2fromcursor_nameinto@tid,@tname,@tpossionWHILE@@fetch_status=0BEGIN--PRINT“ID:”+@tid+"_Name:"+@tname+"_Possion:"+@tpossionselect*fromtbXXXwhereid=@tidupdatetbXXXsettname="张三",tpossion="教授"wheretid=@tidselect*fromtbXXXwhereid=@tidENDCLOSEteacher_cursorDEALLOCATEteacher_cursor不知道成不成了
解决方案四:
每天回帖即可获得10分可用分!
时间: 2024-08-04 06:54:46