连接sql数据库字符串中的逻辑非怎么写?

helloclm 2011-08-23 11:42:58
rs.open "select * from sdata where name1=a and name2=b",conn,1,1

这里的逻辑非怎么写?

rs.open "select * from sdata where name1=a not name2=b",conn,1,1

要打开name1是a的, 但是name2不是b的数据。

not ?
...全文
105 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
helloclm 2011-08-23
  • 打赏
  • 举报
回复
那如果是全文索引中, 该怎么做?

select id from table where CONTAINS(name,'山') and CONTAINS(name,'啊')

需要全文索引中查询name中包含 “山”, 但是没有 “啊” 的数据。
helloclm 2011-08-23
  • 打赏
  • 举报
回复
天呐。。。。。。
挨踢直男 2011-08-23
  • 打赏
  • 举报
回复
rs.open "select * from sdata where name1=a and name2<>b",conn,1,1
亚细亚 2011-08-23
  • 打赏
  • 举报
回复
name2<>b
lj1234567 2011-08-23
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 aspwebchh 的回复:]
rs.open "select * from sdata where name1=a and name2<>b",conn,1,1
[/Quote]
好好看一看相关的资料吧,

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧