Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

CREATE TABLE test1 (id INTEGER PRIMARY KEY);
CREATE TABLE test2 (id2 INTEGER PRIMARY KEY, id INTEGER, FOREIGN KEY id(id) REFERENCES test1(id) ON UPDATE CASCADE ON DELETE CASCADE);

insert into test1(id)values(1);
insert into test2(id2,id)values(1,1);
delete from test1;

Could you tell me if write cascading update statement When ID to update the inside of the other database has been updated

Q2: When I update, or delete the primary key table, then the external key table will follow update, or delete together, need to set cascade properties when the table was being built

asked 09 Oct '13, 00:52

mfkpie8's gravatar image

mfkpie8
273667075
accept rate: 12%

edited 09 Oct '13, 01:04

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×90

question asked: 09 Oct '13, 00:52

question was seen: 2,977 times

last updated: 09 Oct '13, 01:04