摘要: 此解法来自博客园思想瞭望者开设之“sql精英群”对话。iceline(43417365) 11:36:59 现在PATH的上下级关系是对了,我如何更新parentIDthanks(305380844) 12:54:12 做出来了,试试update test set parentid = b.parentidbfrom test ,(select a.id, a.parentid, a.path , b.id as parentidb, b.path as bpathfrom test a cross join test bwhere len(REPLACE(a.path, b.path, &# 阅读全文
posted @ 2012-01-17 09:33 thanks 阅读(387) 评论(0) 推荐(1)