Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 03: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, 04:14
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 5,459
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, 04: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

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