File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes SQL syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL syntax" Watch "SQL syntax" New topic

SQL syntax

Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
I just started using MySQL. I've been creating a table called quotes. one of the columns consists of quotes. From reading the MySql tutorial it says the syntax to use is '"here is my quote"'
but when I have an apostrophe, it interprets it as a one of the single quotes. Is there some sort of escape character for this in SQL?
sharad goswami
Ranch Hand

Joined: Jan 18, 2001
Posts: 51
here u are:suppose table name is sharad
statement.execute("insert into sharad values(\"my quotes\")");

Stop The World I Want To Get Off.
I agree. Here's the link:
subject: SQL syntax
It's not a secret anymore!