[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 564
  • Last Modified:

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 )

0
melisa_
Asked:
melisa_
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
MS SQL Server 7 does not support the "ON DELETE CASCADE" ...
If you have sql server 2000, then i have to look deeper
0
 
gladxmlCommented:
No comment has been added lately and it seems that this question have been abandoned. So it's time to clean up this TA.

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
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now