Explain the use of keyword WITH ENCRYPTION. Create a Store Procedure with Encryption.
It is a way to convert the original text of the stored procedure into encrypted form. The stored procedure gets obfuscated and the output of this is not visible to
CREATE PROCEDURE Abc
WITH ENCRYPTION
AS
<< SELECT statement>>
GO
Explain the use of keyword WITH ENCRYPTION. Create a Store Procedure with Encryption.
WITH ENCRYPTION Indicates that SQL Server will convert the original text of the CREATE PROCEDURE statement to an encrypted format. Users that have no access to system tables or database files cannot retrieve the encrypted text. However, the text will be available to privileged users.
Example:CREATE PROCEDURE salary_sum
WITH ENCRYTION
AS
SELECT sum(salary)
FROM employee
WHERE emp_dept LIKE Develop