当前位置: 动力学知识库 > 问答 > 编程问答 >

oracle - Ignore case in SQL query with JDBC

问题描述:

This question already has an answer here:

  • Case insensitive searching in Oracle

    5 answers

网友答案:

In Java take thus user input and make it upper case.

userString.toUpperCase()

In SQL, use upper function

upper(a_column) = ?

This will probably not allow the database to use an index, so you may need to add another index for the uppercase version of your column. This is only necessary if you are getting a performance hit because of this workaround.

分享给朋友:
您可能感兴趣的文章:
随机阅读: