CREATE FUNCTION [dbo].[udf_BookContentSearch]
(@keywords NVARCHAR(1000))
RETURNS @BookPageDetail TABLE
(
BookPageDetailID int PRIMARY KEY NOT NULL,
[RANK] INT NOT NULL
)
AS
BEGIN
INSERT INTO @BookPageDetail(BookPageDetailID,[RANK])
SELECT [KEY],[RANK]
FROM CONTAINSTABLE(CM_BookPageDetail,(Content,Memo),@keywords)
RETURN
END
GO