ALTER PROCEDURE [dbo].[SelectBycaidList]
@id int
AS
BEGIN
select n.id,[name],title,createtime,n.caid from news n join category c on n.caid=c.id and n.caid=@id
order by createtime desc
END
本文介绍了一个SQL存储过程的具体实现,该过程用于根据提供的类别ID从数据库中选择新闻记录,并按创建时间降序排列。
ALTER PROCEDURE [dbo].[SelectBycaidList]
@id int
AS
BEGIN
select n.id,[name],title,createtime,n.caid from news n join category c on n.caid=c.id and n.caid=@id
order by createtime desc
END

被折叠的 条评论
为什么被折叠?