Peb puas tuaj yeem siv DDL nqe lus hauv cov txheej txheem hauv Oracle?
Peb puas tuaj yeem siv DDL nqe lus hauv cov txheej txheem hauv Oracle?

Video: Peb puas tuaj yeem siv DDL nqe lus hauv cov txheej txheem hauv Oracle?

Video: Peb puas tuaj yeem siv DDL nqe lus hauv cov txheej txheem hauv Oracle?
Video: Siv Yis Neeb Leej Cawm Seej Music Video Short 2024, Hlis ntuj nqeg
Anonim

DDL cov ntsiab lus tsis pub nyob rau hauv Cov txheej txheem ( PLSQL LOCK) PL / SQL cov khoom yog precompiled. Ntawm qhov tod tes, DDL (Cov ntaub ntawv txhais lus) nqe lus zoo li CREATE, DROP, ALTER lus txib thiab DCL (Data Control Language) nqe lus zoo li GRANT, REVOKE ua tau hloov cov dependencies thaum lub sij hawm ua tiav ntawm qhov kev pab cuam.

Ntxiv mus, peb puas tuaj yeem siv DDL nqe lus hauv cov txheej txheem khaws cia?

Koj siv tau nkaus xwb DDL COMMENT nqe lus hauv a khaws cov txheej txheem . Koj tsis tuaj yeem qhia DML COMMENT nqe lus , uas yog txwv rau embedded SQL ntawv daim ntawv thov, mus nqa cov lus rau cov khoom siv database, kab ntawm lub rooj, thiab cov tsis. Txhua qhov kev hloov pauv ntawm CREATE TABLE nqe lus siv tau.

Tom qab ntawd, lo lus nug yog, peb puas tuaj yeem siv DML nqe lus hauv cov txheej txheem? Koj ua tau ncaj qha nkag mus rau SQL cov ntaub ntawv manipulation lus ( DML ) nqe lus hauv PL/SQL blocks, thiab koj tuaj yeem siv cov txheej txheem , muab los ntawm Oracle, los ua cov ntaub ntawv txhais lus (DDL) nqe lus.

Yog li ntawd, peb puas tuaj yeem siv DDL nqe lus hauv kev ua haujlwm hauv Oracle?

Tsis muaj DDL tso cai: A muaj nuj nqi hu los ntawm sab hauv SQL nqe lus yog txwv tsis pub DDL vim DDL teeb meem ib tug implicit cog lus. Koj tsis tuaj yeem tawm ib qho twg DDL cov ntsiab lus los hauv ib PL/SQL muaj nuj nqi . Kev txwv tsis pub muaj kev txwv: Koj ua tsis tau siv a muaj nuj nqi nyob rau hauv lub check constraint ntawm tsim lub rooj DDL lus.

Kuv yuav khiav DDL tsab ntawv hauv Oracle li cas?

  1. Kauj Ruam 1: Npaj koj DDL ua ntej.
  2. Kauj ruam 2: Khiav koj DDL los ntawm PL / SQL program siv Execute tam sim.
  3. Ua ntej: Ib txwm kaw koj cov lus SQL rau hauv ib khub ntawm Ib Leeg Quotes.
  4. Thib ob: Saib xyuas Semi-colon.

Pom zoo: