如何解决 在关键字 'else' 附近有语法错误
drop table rkpc
create table rkpc(id int, name varchar(10), idnum int,户主 varchar(10))
insert into rkpc values(1 , '张三' , 434300 ,null)
insert into rkpc values(2 , '张三老婆', null ,null)
insert into rkpc values(3 , '张三女儿', null ,null)
insert into rkpc values(4 , '李四' , 434311 ,null)
insert into rkpc values(5 , '李四老婆', null ,null)
insert into rkpc values(6 , '李四儿子', null ,null)
go
select * FROM RKPC
declare @id int,@idnum char(30)
declare cur cursor fast_forward for
select int,innum from rkpc;
fetch next from cur into @id,@idnum;
open cur
if IDNUM IS NOT NULL
begin
update rkpc set 户主='是'
where id=@id
else
update rkpc set 户主='否'
where id=@id;
fetch next from cur into @id,@idnum;
end
close cur
服务器: 消息 156,级别 15,状态 1,行 14
在关键字 'else' 附近有语法错误。
这个是怎么回事
create table rkpc(id int, name varchar(10), idnum int,户主 varchar(10))
insert into rkpc values(1 , '张三' , 434300 ,null)
insert into rkpc values(2 , '张三老婆', null ,null)
insert into rkpc values(3 , '张三女儿', null ,null)
insert into rkpc values(4 , '李四' , 434311 ,null)
insert into rkpc values(5 , '李四老婆', null ,null)
insert into rkpc values(6 , '李四儿子', null ,null)
go
select * FROM RKPC
declare @id int,@idnum char(30)
declare cur cursor fast_forward for
select int,innum from rkpc;
fetch next from cur into @id,@idnum;
open cur
if IDNUM IS NOT NULL
begin
update rkpc set 户主='是'
where id=@id
else
update rkpc set 户主='否'
where id=@id;
fetch next from cur into @id,@idnum;
end
close cur
服务器: 消息 156,级别 15,状态 1,行 14
在关键字 'else' 附近有语法错误。
这个是怎么回事
...全文
相关推荐
C语言命语法错误大全
解决方法是检查代码中是否有计算常量地址的语句,并将其更改为计算变量地址。5. error C2059: syntax error : 'while'该错误是由于while语句附近存在语法错误引起的。
ios-百度地图 定位+附近搜索.zip
在iOS开发中,集成百度地图SDK能够为应用提供丰富的地图功能,如定位、路线规划、附近搜索等。本文将详细讲解如何使用百度地图API在iOS应用中实现定位和附近搜索功能。
查找输入数附近的最大质数。:查找给定数附近的最大质数-matlab开发
总的来说,解决这个问题需要理解质数概念,掌握基本的MATLAB编程,以及优化算法的思考。通过以上步骤,我们能够有效地找出给定数附近的最大质数。在实际应用中,对算法的优化是关键,尤其是在处理大数据时。
百度API根据当前经纬查询附近坐标
查询附近坐标当成功获取到当前位置后,可以进一步查询附近的坐标信息。
android发送EMail附近也可发送
描述中提到,这个功能已经集成到了一个项目中,包含收件人和发件人的设置,这意味着它应该是一个完整的邮件发送解决方案。


