Yuav ua li cas koj tso ib qho kev txwv tshwj xeeb hauv Oracle?
Yuav ua li cas koj tso ib qho kev txwv tshwj xeeb hauv Oracle?

Video: Yuav ua li cas koj tso ib qho kev txwv tshwj xeeb hauv Oracle?

Video: Yuav ua li cas koj tso ib qho kev txwv tshwj xeeb hauv Oracle?
Video: Tsis Muaj Peev Xwm Yuav Ua Li Cas 2024, Hlis ntuj nqeg
Anonim

Lub syntax rau tso tseg qhov kev txwv tshwj xeeb hauv Oracle yog: ALTER TABLE table_name DROP CONSTRAINT constraint_name; table_npe. Lub npe ntawm lub rooj rau hloov kho.

Ua li no, ua li cas koj tso ib qho kev txwv tshwj xeeb?

Tso Cim Tseg Lub syntax rau poob a tshwj xeeb txwv hauv SQL Server yog: ALTER TABLE table_name DROP CONSTRAINT constraint_name; table_npe. Lub npe ntawm lub rooj hloov.

Qhov thib ob, dab tsi yog qhov tshwj xeeb tseem ceeb txwv hauv Oracle? Oracle tshwj xeeb txwv syntax A tshwj xeeb txwv yog kev ncaj ncees txwv uas ua kom cov ntaub ntawv khaws cia rau hauv ib kem, lossis ib pawg ntawm kab, yog tshwj xeeb ntawm cov kab hauv ib lub rooj. Qhov no tshwj xeeb txwv qhia tias qhov tseem ceeb hauv column_name yog tshwj xeeb hla tag nrho lub rooj.

Yog li ntawd, peb puas tuaj yeem poob qhov ntsuas tshwj xeeb hauv Oracle?

chaw ib zaug koj poob tus qhov ntsuas yog li ntawd nws yuav muaj nyob rau lwm yam khoom nyob rau hauv lub rooj qhov chaw. Hloov pauv, koj ua tau 't poob ib qho implicitly tsim qhov ntsuas , xws li cov tsim los ntawm kev txhais a UNIQUE tseem ceeb txwv ntawm lub rooj, nrog rau poob index lus txib.

Dab tsi yog qhov txawv ntawm qhov ntsuas tshwj xeeb thiab qhov tshwj xeeb txwv hauv Oracle?

Cim index yog rau kev ua haujlwm. Txawm li cas los tshwj xeeb txwv thiab cim indexes ob leeg pab nrog tshwj xeeb , lawv lub hom phiaj txawv. A tshwj xeeb txwv yog txhais los tswj cov ntaub ntawv ncaj ncees. A tshwj xeeb txwv tej zaum yuav tsim ib cim index implicitly, tab sis nws tsis vam los yog xav tau qhov ntsuas tswj cov ntaub ntawv ncaj ncees.

Pom zoo: