Home >Database >Mysql Tutorial >sqlite里面支持像sqlserver的like的用法吗?

sqlite里面支持像sqlserver的like的用法吗?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 15:33:281065browse

string sql = Select Count(ID) As rcount From tbArticle WHERE classID IN( + ids + ) AND Title LIKE @Title ; 参数: SQLiteParameter[] sps = new SQLiteParameter[1]; sps[0] = SQLite.CreateParameter(@Title, DbType.String, % + title + %, 50, Par

string sql = “Select Count(ID) As rcount From tbArticle WHERE  classID IN(” + ids + “) AND  Title LIKE @Title “;

参数:

 

 

SQLiteParameter[] sps = new SQLiteParameter[1];

sps[0] = SQLite.CreateParameter(“@Title”, DbType.String, “%” + title + “%”, 50, ParameterDirection.Input);

 

就是在变量里直接模拟成 ‘%test%’ ,把这个传递进去,就可以查出结果了

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