LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2011, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 24 Sep 2011 19:08:20 -0400
Reply-To:     bbser 2009 <bbser2009@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         bbser 2009 <bbser2009@GMAIL.COM>
Subject:      Re: how to change  existing integrity constraints
Comments: To: "DUELL, BOB" <bd9439@att.com>
In-Reply-To:  <AC5F423B9AB19C43BE62C86BAF8113CC127281@WABOTH9MSGUSR8C.ITServices.sbc.com>
Content-Type: text/plain; charset="us-ascii"

Bob,

Thank you very much. I was focusing on the how to change question, forgot the real rule behind.

Best regards, Max

-----Original Message----- From: DUELL, BOB [mailto:bd9439@att.com] Sent: September-24-11 6:16 PM To: bbser 2009; SAS-L@LISTSERV.UGA.EDU Subject: RE: how to change existing integrity constraints

Hi Max,

Sorry, but SAS does not support "cascade" for "delete"; only for "update". See the SQL Procedure User's Guide, ALTER TABLE statement.

The description of "referential-action" appears below the description of the MODIFY clause rather than more naturally after the description of "constraint". The terms seem to be sorted alphabetically rather than in context. Not the clearest of SAS documentation. See also the chapter "Understanding Integrity Constraints" in the "SAS Language: Concept" book (SAS Files Concepts -> SAS Data Files).

Good question though; I haven't messed with SAS integrity constraints in a very long time so this was another blast from the past for me.

Good luck,

Bob

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of bbser 2009 Sent: Saturday, September 24, 2011 2:29 PM To: SAS-L@LISTSERV.UGA.EDU Subject: how to change existing integrity constraints

Greetings!

I was wondering if anyone knew how to change an existing integrity constraint. For example, consider the code below. After running it, how to change the foreign key rule "on delete restrict" to be "on delete cascade"?

Any comments or suggestions are appreciated!

Max (Maaxx) ======================== proc sql; create table employees ( ID num primary key, Name char(10)

create table salaries ( ID num references employees on delete restrict on update set null, Salary num ); quit;


Back to: Top of message | Previous page | Main SAS-L page