字付串函数 substring(ex,star,end)
Posted jackchencnblogs
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了字付串函数 substring(ex,star,end)相关的知识,希望对你有一定的参考价值。
1 --substring(ex,star,end) 2 SELECT SUBSTRING(Name, 1, 2) AS ProductName, ListPrice 3 FROM Production.Product order by ProductName 4 5 SELECT Name FROM Production.Product order by Name 6 7 select * from Production.Product 8 9 10 SELECT SUBSTRING(Name, 1, 6) AS ProductName, ListPrice 11 FROM Production.Product 12 WHERE ListPrice LIKE ‘3%‘; 13 14 15 SELECT SUBSTRING(Name, 1, 30) AS ProductName, ListPrice 16 FROM Production.Product 17 WHERE CONVERT(int, ListPrice) LIKE ‘3%‘;
以上是关于字付串函数 substring(ex,star,end)的主要内容,如果未能解决你的问题,请参考以下文章
javascript中substring()substr()slice()的区别
atcoder abc158 E - Divisible Substring
LeetCode刷题系列 - 003题Longest Substring Without Repeating Characters