Hello,
I am working through ProSpring book, in which they are using Postgres. I need to convert the following inserts into Mysql 5. The table 'Test' , 'Customer' work fine, but 'CustomerAddresses' blows up on the delete cascade portion. As I was trying to figure out the error, another question was posed. The 'Constraint'. Doesn't that just tell the column that the values within the table must be unique? Or does it create an index? I have always been confused on that. Thanks, Scott drop table Test; drop table CustomerPermissions; drop table CustomerAddresses; drop table Permissions; drop table Customers; create table Test ( TestId serial not null, Name varchar(50) not null, RunDate timestamp not null, constraint PK_TestId primary key (TestId) ); create table Customers ( CustomerId serial not null, FirstName varchar(50) not null, LastName varchar(50) not null, constraint PK_CustomerId primary key (CustomerId) ); create table CustomerAddresses ( CustomerAddressId serial not null, Customer int not null, Line1 varchar(50) not null, Line2 varchar(50) not null, City varchar(50) not null, PostCode varchar(50) not null, constraint PK_CustomerAddressId primary key (CustomerAddressId), constraint FK_Customer foreign key (Customer) references Customers (CustomerId) on delete cascade on update cascade );