freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)據(jù)庫默認值約束、默認值對象、檢查約束、規(guī)則、完整性實現(xiàn)-資料下載頁

2025-05-09 03:03本頁面
  

【正文】 ase System 3) 刪除 PRIMARY KEY約束或 UNIQUE約束 語法格式: ALTER TABLE table_name DROP [CONSTRAINT] constraint_name [,… n] Principle and Application of Database System ALTER TABLE XS5 DROP CONSTRAINT student3_PK,student3_UK Principle and Application of Database System 參照完整性的實現(xiàn) 1. 利用 SSMS定義表間的參照關系 Principle and Application of Database System 參照完整性的實現(xiàn) 關系設置界面 Principle and Application of Database System 參照完整性的實現(xiàn) 2. 利用 SSMS刪除表間的參照關系 如果要刪除前面建立的 score表與 student、 course表之間的參照關系,可按以下步驟進行: (1) 進入主表或從表的表設計器界面,在此進入的是從表 score的表設計器,右擊鼠標,出現(xiàn)一快捷菜單,選擇菜單項“關系” . (2) 在圖的屬性界面的關系下拉表中選擇要刪除的關系,然后點擊“刪除”按鈕,選擇“關閉”按鈕。 score表的參照關系屬性界面 Principle and Application of Database System 參照完整性的實現(xiàn) 3. 利用 SQL命令定義表間的參照關系 (1) 創(chuàng)建表的同時定義外碼約束 語法格式: CREATE TABLE table_name /*指定表名 */ (column_name datatype [FOREIGN KEY ] REFERENCES ref_table ( ref_column ) [ ON DELETE { CASCADE | NO ACTION } ] [ ON UPDATE { CASCADE | NO ACTION } ] [, …n] ) /*n表示可定義多個字段 */ Principle and Application of Database System ? 例 在 student數(shù)據(jù)庫中創(chuàng)建主表student4,course4, sno為 student4表的主鍵, o為 course4的唯一鍵,然后定義從表 score4, ,與 student4表的主鍵對應,當對主表進行更新和刪除操作時,對從表采用 CASCADE操作,與 course4的唯一鍵對應,當對主表進行更新和刪除時,對從表采用 NO ACTION方式。 Principle and Application of Database System CREATE TABLE student4 (sno char(5) PRIMARY KEY, sname char(8), ssex char(2), sbirthday datetime, class char(5) ) Principle and Application of Database System CREATE TABLE course4 (o char(10) UNIQUE, ame char(16), tno char(5) ) Principle and Application of Database System CREATE TABLE score4 (sno char(5) FOREIGN KEY REFERENCES student4(sno) ON UPDATE CASCADE ON DELETE CASCADE, o char(10) FOREIGN KEY REFERENCES course(o) ON UPDATE NO ACTION ON DELETE NO ACTION, degree numeric(18,1) ) Principle and Application of Database System (2) 通過修改表定義外碼約束 語法格式: ALTER TABLE table_name ADD [ CONSTRAINT constraint_name] [FOREIGN KEY] ( column [ ,...n ] ) REFERENCES ref_table ( ref_column [ ,...n ] ) [ ON DELETE { CASCADE | NO ACTION } ] [ ON UPDATE { CASCADE | NO ACTION } ] Principle and Application of Database System SQL命令刪除表間的參照關系
點擊復制文檔內(nèi)容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1