We can encrypt the stored procedures using “WITH ENCRYPTION”.
After stored procedure name we have to write the “WITH ENCRYPTION”.
EXAMPLE:
CREATE PROCEDURE spViewEmployees WITH ENCRYPTION
AS
BEGIN
SELECT * FROM Employee
END
Then when you try to find the stored procedure text using the SysComments table text column is coming null.
SELECT * FROM SYSCOMMENTS WHERE ID = OBJECT_ID(‘spViewEmployees’)