以下查询返回什么 [英] what does following query return
问题描述
以下查询将返回
SELECT OnCName FROM user_name_cno具有INSTR('sdfd',OnCName)> 0
用mysql编写的这个查询我希望在postgres中构建相同的查询
所以请帮我缩短这个查询
会员10891595写道:okkkkk然后告诉我我们将在mysql的INSTR位置的postgres数据库中使用什么关键字
你可以自己轻松找到它。这是一个特定于MySql的指令,可以使用其他字符串函数来实现。
请参阅此代码,该代码也适用于Postgres: http://www.postgresql.org/docs/7.4/static/plpgsql- porting.html#PLPGSQL-PORTING-APPENDIX [ ^ ]。
-SA
< blockquote>这将是你在postgres中的查询sql
SELECT OnCName FROM user_name_cno有位置(OnCName中的'sdfd')> 0
what will be following query return
SELECT OnCName FROM user_name_cno having INSTR('sdfd',OnCName)>0
this query written in mysql and i want to build same query in postgres
so pls help me short out this query
Member 10891595 wrote:okkkkk then tell me what keyword we will use in postgres database at the place of the INSTR in mysql
You could easily find it yourself. This is an instruction specific to MySql, which can be implemented using other string functions.
Please see this code, which is supposed to work in Postgres as well: http://www.postgresql.org/docs/7.4/static/plpgsql-porting.html#PLPGSQL-PORTING-APPENDIX[^].
—SA
This will be your query in postgres sql
SELECT OnCName FROM user_name_cno having position('sdfd' in OnCName)>0
这篇关于以下查询返回什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!