我有一批sql语句,例如...
I have a batch of sql statements such as ...
插入.... 插入.... ; 删除.........;
insert into.... ; insert into.... ; delete .........;
等
当我尝试针对oracle执行它们时,它给了我此错误(ORA- 00911无效字符)
When i try to execute them against oracle it gives me this error (ORA-00911 Invalid Character)
现在我可以理解,这是由于语句之间的分号所致,我在SQL Server上尝试了此操作,但仍有效,但到目前为止在Oracle中还算不上运气.
now i can understand that this is because of the semicolon between the statements, i tried this on SQL Server and it worked but in Oracle no luck so far.
是否有一种方法可以通过使用ExecuteScalar或其他函数针对oracle运行多个语句?
Is there a way to run multiple statements against oracle by using the ExecuteScalar or some other function?
重复:如何使用.NET执行多个Oracle SQL语句
推荐答案尝试使用BEGIN..END
BEGIN insert into.... ; insert into.... ; delete .........; END;更多推荐
在Oracle中的一个ExecuteScalar中运行多个命令
发布评论