以下sql 语句在企业管理器与查询分析器下的查询结果竟然是不一样的。 select * from table1 leftouter join table2 on table1.no=table2.no where table1.name!=table2.name 例如table1、table2表中数据如下 table1: no name 1 张三 2 李四 3 王五 table2: no name 1 李四 2 张三 3 王五 企业管理器中结果为: no name no name 1 张三 1 李四 2 李四 2 张三 3 王五 null null 查询分析器中结果为: 1 张三 1 李四 2 李四 2 张三 企业管理器中自动把语句变成了: select * from table1 left outer join table2 on table1.no=table2.no and table1.name!=table2.name 难道企业管理器的自动改变格式让sql的语义也变化了么?不知道大家有没有遇到过这个问题。 写出来给大家参考,欢迎讨论。以上为sql server 2000+sp2 window2000+sp4下的结果. 
|