Dab tsi yog nrog kev xaiv kos hauv Oracle?
Dab tsi yog nrog kev xaiv kos hauv Oracle?

Video: Dab tsi yog nrog kev xaiv kos hauv Oracle?

Video: Dab tsi yog nrog kev xaiv kos hauv Oracle?
Video: Pog txawj tuag ua Dab 1/21/2020 2024, Kaum ib hlis
Anonim

Oracle Nrog KUJ OPTION lus

Nrog KUJ OPTION clause yog siv rau kev saib updataable los txwv tsis pub cov kev hloov pauv rau qhov pom uas yuav tsim cov kab uas tsis suav nrog hauv cov lus nug. Cov lus hauv qab no tsim ib qho kev pom uas muaj kab raws li qhov xwm txheej ntawm WHERE clause.

Khaws qhov no hauv kev txiav txim siab, dab tsi yog nrog kev xaiv kos hauv kev pom?

Nrog KUJ OPTION ntawm a saib . Nrog KUJ OPTION yog ib lub ntsiab lus xaiv ntawm CREATE SAIB nqe lus. Nws qhia txog qib ntawm kev tshuaj xyuas thaum cov ntaub ntawv raug tso lossis hloov kho los ntawm a saib . Yog nrog KUJ OPTION tau teev tseg, txhua kab uas tau ntxig lossis hloov kho los ntawm qhov saib yuav tsum ua raws li lub ntsiab txhais ntawm lub saib.

Qhov thib ob, kev saib puas tuaj yeem hloov kho hauv Oracle? Teb: A SAIB hauv Oracle yog tsim los ntawm kev koom nrog ib lossis ntau lub rooj. Thaum koj hloov tshiab record(s) hauv a SAIB , nws tshiab cov ntaub ntawv nyob rau hauv cov lus hauv qab uas ua rau Saib . Yog li, yog, koj tuaj yeem hloov kho data hauv ib Oracle VIEW muab koj muaj cai tsim nyog rau lub hauv paus Oracle rooj.

Tom qab ntawd, lo lus nug yog, dab tsi yog nrog kev xaiv kos hauv SQL?

SQL ntawv saib nrog "nrog xaiv xaiv " KUJ OPTION Forces tag nrho cov ntaub ntawv hloov kho cov nqe lus tau ua tawm tsam qhov kev pom kom ua raws li cov txheej txheem teev tseg hauv select_statement. Thaum ib kab hloov kho los ntawm kev pom, WITH KUJ OPTION ua kom cov ntaub ntawv tseem pom los ntawm qhov pom tom qab kev hloov kho tau cog lus.

Cov lus txib twg yuav tshem tawm qhov pom?

SQL ntawv Tsoo Saib A saib yog muab tshem tawm nrog DROP VIEW hais kom ua.

Pom zoo: