SQL Server Utilities



  • Execute a query with parameters
  •  
    .
    exec sp_executesql N'select Name, Description from Student where FatherName = @FatherName AND MotherName =  @MotherName',N'@FatherName nvarchar(5000),@MotherName nvarchar(5000)',@FatherName=N'Jack',@MotherName=N'Martha'

  • Replace null value with some other value
  •  
    ISNULL(@FilterValue,'all')
    






No comments:

Post a Comment