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 > ALTER TABLE WITH TYPE=InnoDB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-29-04, 12:55
nnvs nnvs is offline
Registered User
 
Join Date: Jun 2004
Posts: 1
ALTER TABLE WITH TYPE=InnoDB

Hi all,

I am running version 4.0.20a of Mysql and have launched the server in ansi mode. While executing the following set of statements (see below), I get a syntax error in the "ALTER TABLE.....TYPE=InnoDB" statement, the create statements work fine. The erro is:

ERROR 1064 at line 23: 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 'TYPE=InnoDB' at line 1

I have checked the manual and other relevant material. Does anyone know what the problem could be.
Any help will be highly appreciated.

Thanks,
nnvs

CREATE TABLE A (
PROPERTY_ID INT(10) NOT NULL,
CONSTRAINT PK_ATTACHMENT_PROPERTY_DEF PRIMARY KEY (PROPERTY_ID)
)TYPE=InnoDB;

CREATE TABLE B (
OBJ_ID INT(10) NOT NULL,
PROPERTY_ID INT(10) NOT NULL,
SEQUENCE INT(3) NOT NULL,
VALUE VARCHAR(200),
NAME VARCHAR(200),
MIME VARCHAR(200),
CONTENT LONGBLOB,
CONSTRAINT PK_ATTACHMENT_VALUES PRIMARY KEY (OBJ_ID, PROPERTY_ID, SEQUENCE)
)TYPE=InnoDB;

ALTER TABLE B ADD CONSTRAINT FK_ATTACHME_INSTANTIA_ATTACHME FOREIGN KEY (PROPERTY_ID) REFERENCES A (PROPERTY_ID) ON DELETE CASCADE TYPE=InnoDB;
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