如何使用存储过程来拆分mysql中的文本 [英] how to split the text in mysql using stored proceduer
本文介绍了如何使用存储过程来拆分mysql中的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
这个查询在sql server中运行正常,如何在MySql中编写相同的查询
sql server查询就像这个,
hi all,
this query working fine in sql server, how to write same query in MySql
sql server query is like this,
select SUBSTRING('city,sate',0,CHARINDEX(',','city,sate',0))
select SUBSTRING('city,sate',
(CHARINDEX(',','city,sate',0)+1),(lEN('city,sate')-(CHARINDEX(',','city,sate',0))))
谢谢你
Thank u
推荐答案
阅读本文:
http://dev.mysql.com/doc/refman/5.0/en/regexp.html#operator_regexp [< a href =http://dev.mysql.com/doc/refman/5.0/en/regexp.html#operator_regexp\"target =_ blanktitle =新窗口> ^ ]
http://ondra.zizka.cz/stranky/programovani/sql/mysql_stored_procedures.texy [ ^ ]
- Krunal R。
Read this :
http://dev.mysql.com/doc/refman/5.0/en/regexp.html#operator_regexp[^]
http://ondra.zizka.cz/stranky/programovani/sql/mysql_stored_procedures.texy[^]
-Krunal R.
这篇关于如何使用存储过程来拆分mysql中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文