Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

quick question

Name: !id/tRanCE. 2010-06-11 20:30

>>Why does the MySQL interpreter produce the error message shown below when the following table creation command is executed?

create table order (
    order_id int(8) not null auto_increment,
    cust_id int(8),
    product_id int(5),
    primary key (order_id)
);


ERROR 1064: You have an error in your SQL syntax near 'order (
orderid int(8) not null auto_increment,
cust_id int(8),
product_id int(5' at line 1

How could you fix this problem?

Name: Anonymous 2010-06-11 20:43

How could you fix this problem?
Well, the first step is to put the code in the [code] tags.

Name: Anonymous 2010-06-11 20:51

The second is either to stop using MySQL or to learn the syntax.

Name: Anonymous 2010-06-11 20:54

order

There's your fucking problem. Don't use fucking SQL keywords for your table and field names, dipshit.

Make yourself well-acquainted with something like this:
http://www.petefreitag.com/tools/sql_reserved_words_checker/

Name: Anonymous 2010-06-11 23:39

It's 2010. Write your shit in a syntax highlighter. Are you even trying?

Name: Anonymous 2010-12-25 22:19


Don't change these.
Name: Email:
Entire Thread Thread List