Database 版 (精华区)

发信人: Fear_All@bbs.ustc.edu.cn (大陆守护者), 信区: cndatabase
标  题: Re: 关于一个查询
发信站: 中国科大BBS站 (Sun Jul 19 20:46:56 1998)
转信站: Lilac!ustcnews!ustcbbs

> ==> Jinye_Martin(martin)                     说道: 
> select table2.* from table2  
>   where field2 > variant and                // 条件1 
>   field1 not in (select field1 from table1) // 条件2
           ^^^^^^^^^^
           IN 子句好象不能在 foxpro 里面用吧? 子集语句倒是可以.
           所以我才会犯了想当然的错误.
> union 
> select table2.* from table2, table1  
>   where table2.field2 > variant and         //条件1 
>   table1.field1 = table2.field1 and 
>   table1.field2 > variant          //条件3   

--
※ 来源: 中国科大BBS站 [bbs.ustc.edu.cn]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.836毫秒