1问,在SQL2000的左边的下面有个字符函数在里面能找到,我没2000,所以....
3问,就是2个表的连接,像这样
SELECT Max(dbo.RoleModule.RightCode)
FROM dbo.UserInfo INNER JOIN
dbo.RoleUser ON dbo.UserInfo.UserID = dbo.RoleUser.UserID INNER JOIN
dbo.RoleInfo ON dbo.RoleUser.RoleID = dbo.RoleInfo.RoleID INNER JOIN
dbo.RoleModule ON dbo.RoleInfo.RoleID = dbo.RoleModule.RoleID INNER JOIN
dbo.ModuleInfo ON
dbo.RoleModule.ModuleID = dbo.ModuleInfo.ModuleID
WHERE dbo.UserInfo.UserID = @UserID AND dbo.ModuleInfo.ModuleID = @ModuleID
4问,这是个分组,select语句后跟group by,再加字段名
其他的我不清楚
[此贴子已经被作者于2007-4-5 12:55:24编辑过]