This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes mysql help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mysql help" Watch "mysql help" New topic
Author

mysql help

Jardel Tan
Greenhorn

Joined: Sep 11, 2001
Posts: 14
hi
i would like to know how to insert a statement like
"i'm " into mysql table
insert into table values ('I'm')
Yogen Vadnere
Ranch Hand

Joined: Sep 20, 2001
Posts: 58
Please try following....
insert into table values ('I''m')

Yogen Vadnere
kim jungil
Greenhorn

Joined: Sep 27, 2001
Posts: 27
Originally posted by Jardel Tan:
hi
i would like to know how to insert a statement like
"i'm " into mysql table
insert into table values ('I'm')

you can try like this 'I\'m'
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

A third way (and definitely my favourite) use PreparedStatements - this lets each database driver type take care of the specifics for escaping data.

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mysql help
 
Similar Threads
Insert Query with auto-incrementing key
JDBC: MySQL vs. SQL Server?
SQL quotation question
SQL formatting question
how to know the last auto-increment number using JDBC