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

sql - Is there a way to use INSTR() function in DERBY DATABASE?

问题描述:

Is there any way to use INSTR('asd','a',1) (which we have for oracle) in Derby databse?

网友答案:

You can use LOCATE for this purpose.

https://db.apache.org/derby/docs/10.7/ref/rrefsqlj61998.html

The LOCATE function is used to search for a string within another string. If the desired string is found, LOCATE returns the index at which it is found. If the desired string is not found, LOCATE returns 0.

Syntax

LOCATE(CharacterExpression, CharacterExpression [, StartPosition] )
分享给朋友:
您可能感兴趣的文章:
随机阅读: