File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL syntax" Watch "SQL syntax" New topic
Author

SQL syntax

Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
Hi,
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?
Thanks,
Sean
sharad goswami
Ranch Hand

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


Stop The World I Want To Get Off.
 
Consider Paul's rocket mass heater.
 
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