mercredi 20 avril 2016

SQL Query IF Statement in Stored Procedure

What is the proper and efficient way of making the condition in the given query?

Yes it's working, but I want the query to be more efficient, example what if there's a lot of strings to be validated with @CORP.

ALTER PROCEDURE [dbo].[sp_EditProfile]
      @CORP AS VARCHAR(100)
AS
BEGIN
       IF((@CORP = 'something') OR (@CORP = 'somethingElse')) //CONDITION
       BEGIN
       END
END

Aucun commentaire:

Enregistrer un commentaire