Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    197

    Smile Unanswered: interesting problem

    hi
    suppose column is varchar and i want to write query as

    insert into ISMWL values('It's my hobby');

    problem is i cant add It's in varchar how can we write it's

  2. #2
    Join Date
    Dec 2005
    Posts
    273
    simply double the quote within the string:

    insert into ISMWL values('It''s my hobby');

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    to avoid all confusion, what umayer meant to say was two consecutive single quotes (and not, as some people might think, a doublequote)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •