Sunday, 14 December 2014

SET NOCOUNT

Stops the message that shows the count of the number of rows affected by a Transact-SQL statement or stored procedure from being returned as part of the result set.Syntax: SET NOCOUNT { ON | OFF } RemarksWhen SET NOCOUNT is ON, the count is not returned. When SET NOCOUNT is OFF, the count is returned.The...

Wednesday, 10 December 2014

Built-in Functions (Transact-SQL)

CHARINDEX - Searches an expression for another expression and returns its starting position if found. DECLARE @FullName VARCHAR(100) SET @FullName = 'Clark Kent' select CHARINDEX(' ', @FullName) Output – 6 STUFF - The STUFF function inserts a string into another string. It deletes a specified...