If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Hi all please help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-07-08, 02:56
rkhanal rkhanal is offline
Registered User
 
Join Date: Mar 2008
Posts: 22
Hi all please help

Hi guys,
I am having a problem here creating a table.
I have a Employee Table which looks like this :-

mysql> SELECT * FROM Employee;
+-------------+----------+
| Employee_ID | Name |
+-------------+----------+
| 1 | Ranjeet |
| 2 | Alax |
| 2 | Kylie |
| 4 | Weiming |
+-------------+-----------+
4 rows in set (0.00 sec)


Now when i am trying to create another Table called " Order" with i am having problem.FYI :-

===>

mysql> CREATE TABLE ORDER
-> (Product_ID INT(10), Product VARCHAR(10), Employee_ID INT(10));

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER
(Product_ID INT(10), Product VARCHAR(10), Employee_ID INT(10))' at line 1

===>

Can anyone correct me please. I have used the same syntex before and was working.

regards,
Ran
Reply With Quote
  #2 (permalink)  
Old 04-07-08, 03:14
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
check the MySQL manual for reserved words..
Im guessing you cannot have a table called Order
Reply With Quote
  #3 (permalink)  
Old 04-07-08, 03:43
rkhanal rkhanal is offline
Registered User
 
Join Date: Mar 2008
Posts: 22
Quote:
Originally Posted by healdem
check the MySQL manual for reserved words..
Im guessing you cannot have a table called Order

You are right, Healdem.

I created another table with different name and it works. Thanks for your help.

regards,
Ran
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On