Search code examples
sqlsql-serverencryptionsource-code-protection

SQL Server Procedure with Encryption input Parameter


I am new at using procedure with encryption, I tried altering my procedures to encrytped procedure. When there is no input parameter something like,

ALTER PROCEDURE [dbo].[Stock] WITH ENCRYPTION
     -- @Input_Parameter1 nvarchar(50) -> gives syntax error
AS
BEGIN
    SET NOCOUNT ON;

    select * from Inventory
END

It works. But when I add some input parameters between WITH ENCRYPTION and as it throws an error. How can I do that ?


Solution

  • just you miss syntaxes

    CREATE PROCEDURE [dbo].[Stock] 
    @Input_Parameter1 nvarchar(50) --> gives syntax error
    WITH ENCRYPTION
    ...