EXEC does not require quotation marks?

  • What will be output for this query:

    CREATE PROC MyProc_p

    (@param VARCHAR(30))

    AS

    SELECT @param AS Passed_param

    GO

    EXEC MyProc_p test_string

    GO

    EXEC MyProc_p 'test_string'

    GO

    EXEC MyProc_p test string

    GO

    EXEC MyProc_p 'test string'

    GO

    EXEC MyProc_p [test string]

    GO

  • Why don't you try it on SSMS?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply