# Database Discussions > MySQL >  Problem with single quote in SQL 2K

## Rozie

Hi all,

I have a problem. I can code to insert a string which has single quote from screen into database. However, when I search from Query in database to find this record, it cannot find the record that I inserted.
For example: select UserID, Title from WCS_USER
                   where Title = ' how're you? '

Pls guide me how to solve this problem as soon as possible. Thank all of you.

----------


## stecal

SQL> create table dbj
  2  (text varchar2(50));

Table created.

SQL> insert into dbj values ('Isn'||chr(39)||'t this better?');

1 row created.

SQL> select * from dbj;

TEXT
--------------------------------------------------
Isn't this better?

SQL> select * from dbj
  2  where text = 'Isn\'t this better?';
ERROR:
ORA-01756: quoted string not properly terminated

SQL> select * from dbj
  2  where text = 'Isn''t this better?';

TEXT
------------------------------------------------
Isn't this better?

----------


## Rozie

Thank you so much! I now find out the solution  :Big Grin: .
Thanks again  :Smilie:

----------

