一段将某一特定用户产品里的分类代码以及名字取出的sql语句: select P.ProductTypeCode2,T.TypeName from (select distinct ProductTypeCode2 from Info_ProductInfo where UserId=1427) as P,Sys_ProductType as T where P.ProductTypeCode2 = T.Id 可以在页面中只显示该用户发布过的产品所在的分类。如果该用户没有此类产品,不会显示该分类名。用法:可以直接使用,也可以放入存储过程中。 相关文章: 2022-12-23 2022-12-23 2021-06-28 2022-12-23 2022-12-23 2022-12-23 2022-12-23 2022-12-23