SQL截取字符串

来源:互联网 发布:linux vim php插件 编辑:程序博客网 时间:2024/04/29 18:32
select substr(pipecode,6,10) as result from  tbgeneralmap     where cast(projectcode as int)<=15
 
substr(pipecode,6,10) pipecode字段名,6左边开始第6个字符,10取10个字
cast(projectcode as int) cast将projectcode转化为int型,
0 0
原创粉丝点击