hi,
please correct my terminology if it is incorrect but i am trying to
create a number of tables by writing an sql script/batch file and using
the command:
mysql -D myDB -u myname --password=myPass <
scriptname.sql > err.sql 2>&1
and i am getting errors. the book i am using doesnt seem to cover this
topic well but i think i must be doing something silly that is
preventing the script from running successfully.
i have tried using and not using the single quotes in the following
examples. here is the error i get:
+++++++++++++++++++
ERROR 1064 at line 15: 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 ''User'
(
'userId' varchar(25) not null primary key,
'la
+++++++++++++++++++
here are two entries in the script, one w/ quotes one w/o:
CREATE TABLE 'User'
(
'userId' varchar(25) not null primary key,
'lastName' varchar(25) not null,
'firstName' varchar(25) not null,
'organization' varchar(50) not null,
'phone' char(12),
'email' varchar(25),
'lastLogin' datetime,
);
CREATE TABLE Cookie
(
sessionId char(20),
userId varchar(25) not null references User(UserId),
);
+++++++++++++++++++++++
any thoughts will be appreciated.
tia,
peter