显示随机记录
ALTER proc USP_CodeMaster_GetTopDownList
(
@CategoryID int,
@ClassID INT=0
)
As
Set Nocount On
IF @ClassID=0
BEGIN
Select top 10 [CodeID],[Code_Name],[Code_InfoBrief],Code_CategoryID,Code_ClassID from CodeMaster
where Code_CategoryID=@CategoryID and Code_Status='A'
order by NEWID(),Code_DownNum
END
ELSE
BEGIN
Select top 10 [CodeID],[Code_Name],[Code_InfoBrief],Code_CategoryID,Code_ClassID from CodeMaster
where Code_CategoryID=@CategoryID
and Code_ClassID=@ClassID and Code_Status='A'
order by NEWID(),Code_DownNum
END
Return
ALTER proc USP_CodeMaster_GetTopDownList
(
@CategoryID int,
@ClassID INT=0
)
As
Set Nocount On
IF @ClassID=0
BEGIN
Select top 10 [CodeID],[Code_Name],[Code_InfoBrief],Code_CategoryID,Code_ClassID from CodeMaster
where Code_CategoryID=@CategoryID and Code_Status='A'
order by NEWID(),Code_DownNum
END
ELSE
BEGIN
Select top 10 [CodeID],[Code_Name],[Code_InfoBrief],Code_CategoryID,Code_ClassID from CodeMaster
where Code_CategoryID=@CategoryID
and Code_ClassID=@ClassID and Code_Status='A'
order by NEWID(),Code_DownNum
END
Return