|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Table called 'ORDER'...
Im trying to write some queries to a database I didnt design and Ive found that they have created a table with the name 'ORDER'.
Ive no idea why they would do this but they have, so my question is how the hell am I going to run queries on it. When i use say 'select * from order' it says that Ive a syntax error. And this is caused by the keyword order. Any ideas ? this table sits in a ms-access database which Im trying to query to update a mysql database. |
|
#2
|
|||
|
|||
|
Try putting [ ] around the column name. For MS db servers this will let you use non-standard column names. Select * from [ORDER] should work for table names too.
|
|
#3
|
||||
|
||||
|
Valid SQL Code is:
SELECT * FROM table_name WHERE parameters Some SQL requires you to terminate with a semicolon (;) at the end of the statement though. |
|
#4
|
||||
|
||||
|
putting [] round the table name like [order] let me prepare the statement. thanks for that.
Although this worked it showed me another problem, maybe my documentation is wrong on this database. So i wanted to list all tables in the database by using : show tables; This also errors. Where could I find valid sql for a ms access database. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Table called 'ORDER'... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|