模糊查询实例 只要相关匹配即可
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
屌丝一直很屌