----------- --- 1 m 2 f 3 q 3条记录被选中。 select * from emp where sex =''q'' EMPNO SEX ----------- --- 0条记录被选中。 选择* from emp where sex<> '''' EMPNO SEX ----------- --- 2 f $ / b 2条记录被选中。 Hi, I can''t reproduce this on DB2 8.2 with FP8, it shows the expectedresults: select * from emp EMPNO SEX----------- ---1 m2 f3 q 3 record(s) selected.select * from emp where sex = ''q'' EMPNO SEX----------- --- 0 record(s) selected.select * from emp where sex <> ''m'' EMPNO SEX----------- ---2 f3 q 2 record(s) selected. 您好, 我无法在带有FP8的DB2 8.2上重现这一点,它显示了预期的 选择*来自emp EMPNO SEX ----------- --- 1 m 2 f 3 q 3条记录被选中。 select * from emp where sex =''q'' EMPNO SEX ----------- --- 0条记录被选中。 select *来自emp的性别<> '''' EMPNO SEX ----------- --- 2 f 3 q 2条记录被选中。 Hi, I can''t reproduce this on DB2 8.2 with FP8, it shows the expected results: select * from emp EMPNO SEX ----------- --- 1 m 2 f 3 q 3 record(s) selected. select * from emp where sex = ''q'' EMPNO SEX ----------- --- 0 record(s) selected. select * from emp where sex <> ''m'' EMPNO SEX ----------- --- 2 f 3 q 2 record(s) selected. 我也无法想办法让DB2在它的b $ b上发明''x'' 。 DB2不知道查询中没有的常量,数据或者是DDL的b $ .... - Serge Rielau DB2 SQL编译器开发 IBM多伦多实验室 I also cannot possible come up with way for DB2 to invent ''x'' on itsown. DB2 doesn''t know constants that are not in the query, the data orthe DDL.... --Serge RielauDB2 SQL Compiler DevelopmentIBM Toronto Lab 这篇关于为什么会在“启用查询优化”中发生这种情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-25 04:57