File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes About the name of table in mysql Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "About the name of table in mysql " Watch "About the name of table in mysql " New topic
Author

About the name of table in mysql

swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
last time,my project manager give me a table named "order" ,this table is in mysql. I know order is a key word, there is a error when writing sql statement ,how to solve it except changing the the name of the table.
thank you!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You might try putting quotes around it like this:

select * from "order"

This would work for the Microsoft flavor of SQL, but I'm not sure about the MYSQL flavor. If this doesn't work, I don't see any other alternative except renaming the table.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: About the name of table in mysql
 
Similar Threads
How to uplaod excel data into mysql data base in struts..?
how to select 2nd,3rd or the Nth highest salary from a table in desc or ascen order?
RegEx for valid mysql table name
Problem with many-to-many relationships with MySQL
how to get top 5 result from database