sql取值 怎么取前3位

发布网友 发布时间:2022-04-21 09:03

我来回答

3个回答

热心网友 时间:2023-09-21 14:31

记录的用,前三条记录select top 3 * from 表字符串的用,字段的前三个字符select substring(字段,1,3)比如,abcd,结果会是abc

热心网友 时间:2023-09-21 14:31

这个不是SQL吧

sql server 中
Syntax
SUBSTRING ( expression ,start ,length )
Arguments
expression
Is a character string, binary string, text, image, a column, or an expression that includes a column. Do not use expressions that include
aggregate functions.
start
Is an integer that specifies where the substring begins.
length
Is an integer that specifies the length of the substring (the number of characters or bytes to return).

热心网友 时间:2023-09-21 14:32

<% =left(gqwebdir,3)%>

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com