今天做了個小練習碰到一個 問題 如下 在ACCESS里面 *代表任意多個字符 所以我用.NET 做程序的時候這么寫 string strsql=select * from infor where types like '*52*' 然后用.NET執行這句SQL 語句結果不行! 我有分別試了下面兩句還是不行。 string strsql=@
今天做了個小練習碰到一個問題如下
在ACCESS里面 *代表任意多個字符
所以我用.NET 做程序的時候這么寫
string strsql=select * from infor where types like '*52*'
然后用.NET執行這句SQL 語句結果不行!
我有分別試了下面兩句還是不行。
string strsql=@select * from infor where types like '*52*'
string strsql=select * from infor where types like '%52%'
最后我用了
string strsql=@select * from infor where types like '%52%'
我想問問既然在ACCESS里面 可以用* 匹配符,為什么.NET這么寫(第一條,第三條)招不到數據,反而第最后條能找到數據?
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com