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

vb.net - string breaking/stripping using a mysql query

问题描述:

i have a column that i want to select from a table called style_number

each entry is listed as "something-stylenumber"

is there a way to strip everything from the - and to the left from the string when it is returned from mysql?

SELECT style_number FROM table1

I do not want to have to use vb.net to edit the returned string for each line that is pulled

网友答案:
SELECT SUBSTR(style_number, INSTR(style_number, '-') +1 ) FROM table1
分享给朋友:
您可能感兴趣的文章:
随机阅读: