Cov txheej txheem:

Cascade hloov tshiab yog dab tsi?
Cascade hloov tshiab yog dab tsi?

Video: Cascade hloov tshiab yog dab tsi?

Video: Cascade hloov tshiab yog dab tsi?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Hlis ntuj nqeg
Anonim

ON Hloov tshiab CASCADE txhais tau hais tias yog tus niam txiv thawj tus yuam sij raug hloov, tus nqi tus me nyuam kuj tseem yuav hloov los ua kom pom qhov ntawd. ON Hloov tshiab CASCADE RAU DELETE CASCADE txhais tau tias yog koj Hloov tshiab LOSSIS DELETE tus niam txiv, qhov kev hloov pauv yog cascaded rau tus menyuam.

Hais txog qhov no, dab tsi yog ntawm rho tawm cascade ntawm hloov tshiab cascade?

ntawm rho tawm cascade . Nws yuav rho tawm tag nrho cov ntaub ntawv me nyuam thaum niam txiv cov ntaub ntawv yog tshem tawm , yog li ntawd yuav tsis muaj ntaub ntawv me nyuam thaum niam txiv nyob tshem tawm . ntawm update cascade . Nws yuav hloov tshiab tus me nyuam sau parent_id thaum niam txiv cov ntaub ntawv tus ID hloov pauv.

Tsis tas li ntawd, cascade hloov tshiab ntsig txog teb txhais li cas? Yog tias koj xaiv qhov Cascade Update Related Fields kos lub thawv thaum txhais kev sib raug zoo, txhua lub sijhawm koj hloov tus yuam sij tseem ceeb ntawm cov ntaub ntawv hauv thawj lub rooj, Microsoft Access tau txais tshiab lub ntsiab tseem ceeb rau tus nqi tshiab nyob rau hauv tag nrho ntsig txog cov ntaub ntawv.

Hais txog qhov no, Cascade hloov tshiab hauv database yog dab tsi?

CASCADE . Nws yog siv ua ke nrog ON DELETE lossis ON Hloov tshiab . Nws txhais tau hais tias tus me nyuam cov ntaub ntawv yog deleted los yog kho tshiab thaum niam txiv cov ntaub ntawv deleted los yog kho tshiab . SET NULL. Nws yog siv ua ke nrog ON DELETE lossis ON Hloov tshiab.

Kuv yuav siv delete cascade li cas?

Tsim tus yuam sij txawv teb chaws nrog DELETE thiab hloov kho CASCADE cov cai

  1. Xaiv lub rooj niam txiv thiab kab ntawv tseem ceeb hauv lub rooj niam txiv.
  2. Hauv INSERT thiab UPDATE specifications, xaiv Cascade rau txoj cai rho tawm.
  3. Nyem rau Kaw thiab txuag lub rooj hauv tus tsim.

Pom zoo: