永发信息网

求帮把下面这段sqlServer的语句改成MySql格式的 语句

答案:1  悬赏:40  手机版
解决时间 2021-03-23 14:56
  • 提问者网友:我的未来我做主
  • 2021-03-22 22:37
求帮把下面这段sqlServer的语句改成MySql格式的 语句
最佳答案
  • 五星知识达人网友:拜訪者
  • 2021-03-22 23:44
这句话 本就是SQLserver 语句 无需要修改,在SQL2008下能执行,你只需要添加上
declare @classifyID int
set @classifyID=1;--此处可以是你想要查询的任何ID;
with tabs as( select ClassifyID,ParentID from ProductClassify where ClassifyID=@classifyID
union all
select b.ClassifyID,b.ParentID from tabs a,ProductClassify b where a.ParentId=b.ClassifyID )

SELECt AttrbuteID,ProductID,AttrName,AttrValue,AttrType,AddTime,AttrbuteSort,ClassifyID FROM ProductAttrbute where ClassifyID IN(select ClassifyID from tabs) order by ClassifyID asc
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯