根据标题搜索信息

USE [Publishing System ]
GO
/****** Object:  StoredProcedure [dbo].[procselectnewsbycontent]    Script Date: 05/12/2010 12:44:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:  韩慧
-- Create date: 2010-4-15
-- Description: 根据标题搜索信息
-- =============================================
ALTER PROCEDURE [dbo].[procselectnewsbycontent]
 @content varchar(200)
AS
BEGIN
 SELECT n.id,n.caid,n.title,n.createtime ,c.name from news n
 inner join category c on c.id=n.caid
 where n.content like '%'+@content+'%'
 order by createtime desc
 END

<!--E 文章--><!--S 日志顶部操作-->

你可能感兴趣的:(C++,c,C#,Go)