posted 10 years ago
This query executes just fine at the command line; but I am unsuccessful running it as a script even after looking at examples that seem identical!
mysql> source /WorkspaceForResourceProject/Scripts/ResourceTableCreate.sql
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 '->resourceId INT(3) auto_increment primary key, ->aCate' at line 1
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 '?' at line 1
mysql>
Here is the text of the ResourceTableCreate.sql file:
CREATE TABLE resources (->resourceId INT(3) auto_increment primary key,
->aCategory VARCHAR (20),
->url VARCHAR (200),
->title VARCHAR (25),
->createdDateTime TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
->UNIQUE (url) )
->ENGINE=MyISAM;
Thank you for any feedback.