开发者

Is there any string operators like the POSITION() method of MySQL available in SQLite3?

开发者 https://www.devze.com 2022-12-22 06:21 出处:网络
I didn\'t find i开发者_运维知识库t on their doc http://www.sqlite.org/lang_corefunc.html So just want to get confirm or options here.From Instr, Locate or Splite it seems no, but you can implement yo

I didn't find i开发者_运维知识库t on their doc http://www.sqlite.org/lang_corefunc.html

So just want to get confirm or options here.


From Instr, Locate or Splite it seems no, but you can implement your own

I think you will have to write your own user defined function to do this. The SQL standard defines a POSITION() function that returns the position of one string within another, but sqlite doesn't implement it. It should be fairly simple to provide your own function to do this. You can look at the standard functions in func.c for some examples of using the custom function API routines (the same routines are used to define all the standard functions; sum, round, substr, etc.).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号