Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Chapter4 MS SQL Access DB Alterations

Chapter4 MS SQL Access DB Alterations

Ratings: (0)|Views: 8|Likes:
Published by Amitmse
ALTER TABLE Location ALTER COLUMN LocationId int NOT NULL; ALTER TABLE Location ADD CONSTRAINT locationid_pk PRIMARY KEY (LocationId); ALTER TABLE Attendance ADD CONSTRAINT locationid_fk FOREIGN KEY (LocationId) REFERENCES Location(LocationId); DELETE FROM Attendance WHERE MemberAttended = 'N'; ALTER TABLE MemberDetails ALTER COLUMN MemberId int NOT NULL; ALTER TABLE MemberDetails ADD CONSTRAINT memberdetails_pk PRIMARY KEY (MemberId); ALTER TABLE Films ALTER COLUMN FilmId int NOT NULL; UPDATE F
ALTER TABLE Location ALTER COLUMN LocationId int NOT NULL; ALTER TABLE Location ADD CONSTRAINT locationid_pk PRIMARY KEY (LocationId); ALTER TABLE Attendance ADD CONSTRAINT locationid_fk FOREIGN KEY (LocationId) REFERENCES Location(LocationId); DELETE FROM Attendance WHERE MemberAttended = 'N'; ALTER TABLE MemberDetails ALTER COLUMN MemberId int NOT NULL; ALTER TABLE MemberDetails ADD CONSTRAINT memberdetails_pk PRIMARY KEY (MemberId); ALTER TABLE Films ALTER COLUMN FilmId int NOT NULL; UPDATE F

More info:

Published by: Amitmse on Jun 02, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

12/12/2013

pdf

text

original

 
ALTERTABLELocationALTERCOLUMNLocationIdintNOTNULL;ALTERTABLELocationADDCONSTRAINTlocationid_pkPRIMARYKEY(LocationId);ALTERTABLEAttendanceADDCONSTRAINTlocationid_fkFOREIGNKEY(LocationId)REFERENCESLocation(LocationId);DELETEFROMAttendanceWHEREMemberAttended='N';ALTERTABLEMemberDetailsALTERCOLUMNMemberIdintNOTNULL;ALTERTABLEMemberDetailsADDCONSTRAINTmemberdetails_pkPRIMARYKEY(MemberId);ALTERTABLEFilmsALTERCOLUMNFilmIdintNOTNULL;UPDATEFilmsSETFilmId=13WHEREFilmId=12ANDFilmName='TheGood,theBad,andtheFaciallyChallenged';UPDATEFilmsSETFilmId=14WHEREFilmId=2ANDFilmName='15thLateAfternoon';UPDATEFilmsSETFilmId=15WHEREFilmId=2ANDFilmName='SoylentYellow';ALTERTABLEFilmsADDCONSTRAINTfilms_pkPRIMARYKEY(FilmId);ALTERTABLECategoryALTERCOLUMNCategoryIdintNOTNULL;ALTERTABLECategoryADDCONSTRAINTcategory_pkPRIMARYKEY(CategoryId);ALTERTABLEFavCategoryALTERCOLUMNCategoryIdintNOTNULL;ALTERTABLEFavCategoryALTERCOLUMNMemberIdintNOTNULL;ALTERTABLEFavCategoryADDCONSTRAINTfavcategory_pkPRIMARYKEY(CategoryId,MemberId);ALTERTABLEMemberDetails

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->