ORACLE中,程序中如何一次执行多句SQL语句?

tony0115 2001-11-20 10:26:23
如:
sSQL1="delete table where ..."
sSQL2=sSQL1 & "update table where ..."
sSQL3=sSQL2 & "select table where ..."

Cnn.Execute sSQL3???????????
为什么我总是执行,说语句未正确的结束!
...全文
79 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tony0115 2001-11-20
  • 打赏
  • 举报
回复
非常感谢!!!
flowerofwind 2001-11-20
  • 打赏
  • 举报
回复

sSQL1="begin delete table where ...;"
sSQL2=sSQL1 & "update table where ...;"
sSQL3=sSQL2 & "select table where ...;end;"

试试看

IronPromises 2001-11-20
  • 打赏
  • 举报
回复
改成:
sSQL1="delete table where ... ;"
sSQL2=sSQL1 & "update table where ... ;"
sSQL3=sSQL2 & "select table where ... ;"

注意要加上分号.

2,598

社区成员

发帖
与我相关
我的任务
社区描述
Sybase相关技术讨论区
社区管理员
  • Sybase社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧