发布网友 发布时间:2022-04-22 03:23
共4个回答
热心网友 时间:2023-07-22 12:24
b.[代码] + '/' + c.[代码]) as [代码]
,(a.[名称] + '/' + b.[名称] + '/' + c.[名称]) as [名称]
FROM xzqh as a,xzqh as b,xzqh as c
WHERE a.代码 = LEFT(b.代码,1)
and b.代码 = left(c.代码,3)
and LEN(b.代码) = 3
and LEN(c.代码) = 5
不过有点疑问的是一级超过10以后你是怎么定义的?得看你的定义调整语句了
代码如果是整型得转换成字符
热心网友 时间:2023-07-22 12:25
select sex,count(*) from info where party='是' group by sex
热心网友 时间:2023-07-22 12:25
select sex,sum(party) from tabName
where party='是'
group by sex
热心网友 时间:2023-07-22 12:26
select sex,count(sex) party from info where party='是' group by sex