搜索所有不在ArrayList里的记录,应该怎样写? select NAME from company where NAME not in ('aaa',bbb'','sss','dddd') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string sqlStr = "select NAME from company where NAME not in ('aaa','bbb','ccc','ddd')"; 哇,那如果ArrayList里有几十条记录,那不是要写arraylist[0],arraylist[1],...,arraylist[n]条吗? 用not exists比用not in快 你的ArrayList是不是高级语言中的(C#)。若是可以在C#中这样写:string s;for(i=0;i<arraylist.count;i++){ if i=0 s="select * from test where id not in('"+arraylist[i]+"'"; else s=s+",'"+arraylist[i]+"'";}s=s+")"; Oracle 在CMD中执行SQL语句都会出现问好???????怎么解决 biee的回写 如何在group后做数据段连接 【ORACLE】 COMMIT执行效率问题 面试题目 求助! 启动oracle 10g,出现 到实例的代理连接 失败 急,求助,有关ORACLE字符集的问题 问个不同平台上面的程序编写差异的问题 ORACLE下有类似VB下的SPLIT函数吗﹖ oracle 数据库 求一个sql 搜索所有不在ArrayList里的记录,应该怎样写? ORACLE速度问题
若是可以在C#中这样写:
string s;
for(i=0;i<arraylist.count;i++)
{
if i=0
s="select * from test where id not in('"+arraylist[i]+"'"; else
s=s+",'"+arraylist[i]+"'";
}
s=s+")";