ORA-00911錯誤及解決方案

來源:互聯網
上載者:User

在開發中遇到了一個問題,被困擾了好找時間。 事情是這樣的,

因為我們現在做的系統資料庫是用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裡面測試好了的。困惑了好一會,才發現是最後面的那個“;”號惹的禍。

把它刪除掉就行了。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.