EXEC does not require quotation marks?

  • miklushka

    SSC Enthusiast

    Points: 187

    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

  • Luis Cazares

    SSC Guru

    Points: 183572

    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 2 (of 2 total)

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