sql 语句 获取某张表某列字段最短的某几行数据
程序员文章站
2024-02-03 13:33:34
sql 语句 获取某张表某列字段最短的某几行数据 SELECT C_name,C_code FROM Catalog where LEN(C_code)=LEN((SELECT top 1 C_code FROM Catalog order By LEN(C_code))) ......
sql 语句 获取某张表某列字段最短的某几行数据
select c_name,c_code from catalog
where len(c_code)=len((select top 1 c_code
from catalog
order by len(c_code)))