Tuesday, August 12, 2014

Way to do SQL without insert DB

DECLARE @NAME VARCHAR(50)
SET @NAME= 'abc01';

SELECT CHARINDEX('abc', @NAME)

SELECT * FROM Student

WHERE CHARINDEX(@NAME, Name) > 0

No comments:

Post a Comment