How to pass single quote text as parameter to stored procedure in sqlserver

16,175

Solution 1

You can call the stored proc like this

exec stored_proc_name @param_name='Ram''s'

Solution 2

You need to escape the quote by another quote

'Ram''s'
Share:
16,175

Related videos on Youtube

Mahesh
Author by

Mahesh

BY DAY: Alt-Rock Ninja Cowgirl at Veridian Dynamics. BY NIGHT: I write code and code rights for penalcoders.example.org, an awesome non-profit that will totally take your money at that link.

Updated on June 17, 2022

Comments

  • Mahesh
    Mahesh about 2 years

    How to pass "Ram's" or "I'm xxx" type of single quote data as parameter to the stored procedure?