日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

簡單實用游標更改數據

系統 1942 0

alter proc updateStudent
@id int,
@id2 int
as
declare @SchoolID int
declare @ClassID int
declare @StudentID int
declare @IDNumber int
declare @IDAAA int
begin
declare FeeInsertStudent cursor for?
select stuID,SchID,ClasID from T_School where ID=@id
open FeeInsertStudent?
fetch next from FeeInsertStudent into @SchoolID,@ClassID,@StudentID
while @@FETCH_STATUS=0
begin
set @IDNumber=(select count(*) from T_LeaveSchool where StudentID=@StudentID and SchoolID=@SchoolID and ClassId=@ClassID)
set @IDAAA=(select COUNT(*) from T_LeaveSchool where ID=@id2)
if(@IDNumber!=0)
if(@IDAAA!=0)
begin
update T_LeaveSchool set StudentID=@StudentID,ClassID=@ClassID,SchoolID=@StudentID where ID=@id2
end
fetch ?next from FeeInsertStudent into @SchoolID,@ClassID,@StudentID
end
close FeeInsertStudent
deallocate FeeInsertStudent


end

簡單實用游標更改數據


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 渭南市| 金华市| 清镇市| 陵水| 舞钢市| 大理市| 晋城| 涟水县| 新郑市| 徐汇区| 格尔木市| 高雄县| 云安县| 临湘市| 曲松县| 武隆县| 芒康县| 峡江县| 若羌县| 高安市| 神农架林区| 郑州市| 红原县| 油尖旺区| 拉萨市| 屯门区| 柏乡县| 卢湾区| 大宁县| 新民市| 方正县| 岢岚县| 台东市| 宣威市| 赤水市| 克东县| 宜君县| 龙游县| 玛纳斯县| 武隆县| 云霄县|