问题描述:

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] )
相关阅读:
Top