ALTER PROCEDURE [reg].[Proc_CheckRepProject] ( @ProjectNm nvarchar(200) --项目NM ) AS BEGIN DECLARE @key varchar(1000) SELECT TOP 1 @key = ProjectId FROM ProjectInfo WHERE CHARINDEX(ProjectNm, @ProjectNm) <> 0 OR CHARINDEX(@ProjectNm,ProjectNm) <> 0 SELECT * FROM ProjectInfo WHERE ProjectId=@key END