W
Wilson
Dear friends,
I tried to execute this sql in access 2003
------------
1. create table master (id text(10), name text(100))
2. create table sub (id text(10), mas_id text(10), sub_name text(100))
3. alter table master alter column id text(10) constraint MyKey primary key
4. alter table sub alter column id text(10) constraint MyKey primary key
5. alter table sub add constraint MyFKey foreign key (mas_id) references
master ON UPDATE CASCADE ON DELETE CASCADE
---------
1 to 4 steps are working perfect. 5th step failes with an error "syntax
error in constraint"
I tried by removing "ON UPDATE CASCADE ON DELETE CASCADE", it is working!
but, no RI created.
Can anyone point out the syntax error?
thanks in advance
Wilson
I tried to execute this sql in access 2003
------------
1. create table master (id text(10), name text(100))
2. create table sub (id text(10), mas_id text(10), sub_name text(100))
3. alter table master alter column id text(10) constraint MyKey primary key
4. alter table sub alter column id text(10) constraint MyKey primary key
5. alter table sub add constraint MyFKey foreign key (mas_id) references
master ON UPDATE CASCADE ON DELETE CASCADE
---------
1 to 4 steps are working perfect. 5th step failes with an error "syntax
error in constraint"
I tried by removing "ON UPDATE CASCADE ON DELETE CASCADE", it is working!
but, no RI created.
Can anyone point out the syntax error?
thanks in advance
Wilson