Home  >  Article  >  Database  >  ORA-00911错误及解决方法

ORA-00911错误及解决方法

WBOY
WBOYOriginal
2016-06-07 17:58:032849browse

在开发中遇到了一个问题,被困扰了好找时间。 事情是这样的, 因为我们现在做的系统数据库是用Oracle,而我又喜欢凡是和数据库 有关的语句先在pl/sql developer里面测试好了,再往程序里面写。而今天做的代码里 面涉及到查询库里面现在有没有用户输入的表所对

在开发中遇到了一个问题,被困扰了好找时间。 事情是这样的,

因为我们现在做的系统数据库是用Oracle,而我又喜欢凡是和数据库

有关的语句先在pl/sql developer里面测试好了,再往程序里面写。而今天做的代码里

面涉及到查询库里面现在有没有用户输入的表所对应的同义词。所以我便写了这样的一条语句:

string.format(select * from user_synonyms where upper(synonym_name)='{0}' and  upper(table_name)='{0}';",

this.txtSourceTableName.Text.ToUpper());谁知在调试的时候走到这个地方就报“ORA-00911: 无效字符”的错误。

可是我明明在pl/sql developer里面测试好了的。困惑了好一会,才发现是最后面的那个“;”号惹的祸。

把它删除掉就行了。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn