1

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 ?

2 Answers 2

4

just you miss syntaxes

CREATE PROCEDURE [dbo].[Stock] 
@Input_Parameter1 nvarchar(50) --> gives syntax error
WITH ENCRYPTION
...
Sign up to request clarification or add additional context in comments.

1 Comment

@AliCAKIL glad it helps you
2

The WITH ENCRYPTION clause needs to be specified after the parameter declarations:

ALTER PROCEDURE [dbo].[Stock] 

@Input_Parameter1 nvarchar(50) 

WITH ENCRYPTION

AS

BEGIN

SET NOCOUNT ON;

SELECT * FROM dbo.Inventory;

END;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.