inserting single quotes in column
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: inserting single quotes in column

  1. #1
    Join Date
    May 2004
    Location
    Central FL
    Posts
    12

    inserting single quotes in column

    Yello.

    When I do this:

    SELECT rule FROM filter;

    I want to see this:

    name = 'John'

    So....

    How do I insert test data with the single quotes, i.e.

    INSERT INTO filter (rule) values (name = \'John\').

    Thanks.

    p.s. I did a search but it wasn't making sense, because people were saying use CHAR(32) or something like that, I don't understand.

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,458

    Cool

    Try:
    Code:
    INSERT INTO filter (rule) values (name = '''John''');
    -- or --
    INSERT INTO filter (rule) values (name = CHR(39)||'John'||CHR(39));
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

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



Click Here to Expand Forum to Full Width