经典sql

来源:互联网 发布:mac chrome打不开网页 编辑:程序博客网 时间:2024/05/01 23:26
            string CmdStr = @"select * from                                         (select (ROW_NUMBER() OVER (order by usecount)) as r1,a.id,a.tagstr,a.sortid,(select COUNT(*) from use_FileLib where use_FileLib.tag=a.id ) as usecount from use_tag a ) b,                                        (select (ROW_NUMBER() OVER (order by sortid)) as r2,color from use_color) c where b.r1=c.r2 order by b.sortid                                        ";

0 0
原创粉丝点击