var searchValue = 'shahid';
var query = ("select * from students where name ilike '%"+searchValue+"%'");
這是我的psql查詢,但它沒有返回任何值。所以我只是安慰查詢來了解執行情況。當我利用搜索值(沙希德)的第一個字母psql查詢不返回正確的結果?
select * from students where name ilike 'hahid%'
,它的執行完美:
查詢是作爲執行。