wood burning stoves 2.0*
The moose likes JDBC 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: SQL syntax
Similar Threads
java.sql.SQLException: Parameter index out of range (5 > number of parameters, which is 4).
Problems with creating table in mysql through JSP
Entity beans and foreign keys
Embedding MySQL Database in Java Application
Rails MySQL BLOB support