Escape single quotes and wild cards ‘%’ , ‘_’ in MS SQL

I have moved this post to my new Blog. Please click this link to read it.

Advertisements

2 Responses to “Escape single quotes and wild cards ‘%’ , ‘_’ in MS SQL”

  1. jan Says:

    Shouldn’t the example be

    select * from name_column where name like ‘gyan\_sagar’ ESCAPE ‘\’

    since “\” is the escape character to escape “_”?

  2. Nischal Shetty Says:

    Hey there jan…… Thanks a lot for pointing out the error in the example… Glad to hear from you 🙂 I’ve edited the post.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: