melisa_
asked on
on delete cascade
This is are sql command to create my item and customer tables.
The problem here is error
Server: Msg 156, Level 15, State 1, Line 30
Incorrect syntax near the keyword 'on'.
is appear for my item table.
Anybody can help me to solve this problem??
create table customer
(person_ID DECIMAL(10) IDENTITY(1,1) ,
login_ID varchar(10) not null,
password varchar(10) not null,
tel_num varchar(20),
email varchar(30) ,
nama varchar(20),
primary key (person_ID))
create table item
(ref_num DECIMAL(10) IDENTITY(1,1),
seller_ID integer not null,
state varchar(12) not null,
city varchar(15) not null,
price Money not null,
type varchar(20) not null,
primary key (ref_num) ,
foreign key (seller_ID) references customer(person_ID) on delete cascade )
The problem here is error
Server: Msg 156, Level 15, State 1, Line 30
Incorrect syntax near the keyword 'on'.
is appear for my item table.
Anybody can help me to solve this problem??
create table customer
(person_ID DECIMAL(10) IDENTITY(1,1) ,
login_ID varchar(10) not null,
password varchar(10) not null,
tel_num varchar(20),
email varchar(30) ,
nama varchar(20),
primary key (person_ID))
create table item
(ref_num DECIMAL(10) IDENTITY(1,1),
seller_ID integer not null,
state varchar(12) not null,
city varchar(15) not null,
price Money not null,
type varchar(20) not null,
primary key (ref_num) ,
foreign key (seller_ID) references customer(person_ID) on delete cascade )
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I will leave a recommendation in the Cleanup topic area that this question or invite a Moderator to close this question if there's no reply from you after seven days.
In the absence of responses, I will recommend the following:
To accept the comment and points awarded to angelIII
** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **
Just trying to help for the cleanup...
gladxml