Cov nqe lus DML puas tuaj yeem thim rov qab?
Cov nqe lus DML puas tuaj yeem thim rov qab?

Video: Cov nqe lus DML puas tuaj yeem thim rov qab?

Video: Cov nqe lus DML puas tuaj yeem thim rov qab?
Video: Fireboy DML - Jealous (Official Music video) 2024, Kaum ib hlis
Anonim

Cov nyhuv ntawm a DML lus tsis tas mus li kom txog rau thaum koj ua qhov kev hloov pauv uas suav nrog nws. Kev hloov pauv yog ib ntu ntawm SQL nqe lus uas Oracle Database kho raws li ib chav tsev (nws ua tau ua ib leeg DML lus ). Kom txog thaum muaj kev sib cog lus, nws ua tau ua dov rov qab (rov qab).

Tsuas yog li ntawd, cov nqe lus DDL puas tuaj yeem thim rov qab?

DDL cov lus qhia rov qab . Txij li thaum COMMIT tau tshaj tawm rau koj, koj tsis tuaj yeem muab ROLLBACK kom thim rov qab DDL lus . Los ntawm qhov xwm txheej ntawm cov haujlwm no, koj ua tsis tau rov qab dhau los ntawm COMMIT. DDL cov ntsiab lus siv tsis tau sau rau rollback ntu.

Tom qab ntawd, lo lus nug yog, DML nqe lus yog dab tsi? DML . DML yog lub npe luv ntawm Data Manipulation Language uas cuam tshuam nrog cov ntaub ntawv tswj hwm thiab suav nrog feem ntau SQL nqe lus xws li SELECT, INSERT, UPDATE, DELETE, thiab lwm yam, thiab nws yog siv los khaws, hloov, retrieve, rho tawm thiab hloov tshiab cov ntaub ntawv nyob rau hauv ib tug database.

Tom qab ntawd, peb puas tuaj yeem rov qab DML cov lus txib?

DML nqe lus ua tau rov qab, DDL nqe lus ua tau 't. Kev xav txog nws, yog tias koj khiav DDL nqe lus tom qab a DML lus, ti tuaj yeem rov qab cov kev hloov koj tau ua nrog rau DML nqe lus, tab sis tsis yog cov kev hloov pauv los ntawm DDL, yog li koj ua tau tsis rov qab mus li qub.

Puas yog DML nqe lus Autocommit?

Autocommit . Raws li lub neej ntawd, a DML lus ua tiav yam tsis tau pib qhov kev hloov pauv tau txais kev cog lus ntawm kev ua tiav lossis rov qab los ntawm kev ua tsis tiav thaum kawg ntawm nqe lus . Tus cwj pwm no hu ua autocommit . Tus cwj pwm no yog tswj nrog lub AUTOCOMMIT parameter.

Pom zoo: