Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要
SELECT * FROM table1 WHERE name=petter
现在,如果表中有多种类型,petter例如 PETTER, PetterAnd petter。
petter
PETTER
Petter
想要在 cognos report studio 中考虑这三个(PETTER、Petter、petter)的命令?
或者在 DB2 中不使用 'IN' 函数。
我想你想要UPPER(或者LOWER,效果应该是一样的):
UPPER
LOWER
SELECT * FROM table1 WHERE UPPER(name) = 'PETTER'
但是请记住,如果您有一个索引 on name,那么它将无法使用该索引。您可以使用该功能创建(至少如果您在 z/OS 上)索引。在其他平台上,您可以创建生成的列并在其上创建索引。
name