【发布时间】:2017-04-09 17:37:17
【问题描述】:
fl=s.executeUpdate("
insert into demi(rno,subcode,subname,intm,extm,crd,resultdate)
values(
'13JG1A05A0',
'RT22058',
' FREE OPEN SOURCE SOFTWARE(FOSS) LAB ',
'20',
'70',
'2',
'MAY 2015'
)
end where not exists(SELECT * FROM demi WHERE rn0 ='13JG105A0' AND subcode='RT22058')
");
我在 jsp 中使用 postgresql 作为后端,我的 IDE 在此语句中显示错误。 我想在检查并确保不存在此类记录后将记录插入数据库
这个说法正确吗,还是我在尝试垃圾代码?
请帮忙,提前谢谢
【问题讨论】:
-
=>
end where not exists应该是AND where not exists。 -
end where not exists应该是where not exists -
insert没有 where 子句。
标签: postgresql where