Puas yog NULL tus nqi hauv Oracle?
Puas yog NULL tus nqi hauv Oracle?

Video: Puas yog NULL tus nqi hauv Oracle?

Video: Puas yog NULL tus nqi hauv Oracle?
Video: Tus Tseem Poj Laib Ces Yog Kuv | Npauj Nyiag Yaj | Ma Ya | Official MV 2023 2024, Kaum ib hlis
Anonim

Taw qhia rau lub Oracle YOG NULL tus neeg ua haujlwm

NULL tshwj xeeb hauv kev nkag siab tias nws tsis yog tus nqi zoo li tus naj npawb, kab cim, lossis hnub tim, yog li ntawd, koj tsis tuaj yeem muab piv nrog lwm yam tus nqi zoo li xoom (0) lossis ib txoj hlua khoob (”). Feem ntau hais lus, NULL yog txawm tsis sib npaug NULL

Tom qab ntawd, yog qhov xwm txheej NULL hauv Oracle?

Cov Oracle YOG NULL mob yog siv los kuaj rau a NULL tus nqi. Koj tuaj yeem siv lub Oracle YOG NULL mob hauv ib qho SQL nqe lus los yog nyob rau hauv ib qho thaiv ntawm PLSQL code.

Kuj Paub, iS NULL hauv PL SQL? NULL tsis yog ib qho (tsis yog) tus nqi hauv PL / SQL ntawv . Nws kuj yog ib nqe lus, albeit a 'no-op' (tsis muaj kev ua haujlwm)-nws tsuas yog hla kev tswj mus rau nqe lus tom ntej. Ntawm no yog ob qho piv txwv. NULL nqe lus hauv ELSE clause.

Qhov thib ob, puas yog null sib npaug rau null hauv Oracle?

Vim null sawv cev rau qhov tsis muaj ntaub ntawv, a null ua tsis tau sib npaug los yog tsis sib npaug rau ib qho nqi lossis rau lwm tus null . Txawm li cas los xij, Oracle suav tias yog ob nulls ua sib npaug thaum ntsuas qhov DECODE muaj nuj nqi. Oracle kuj suav tias yog ob nulls ua sib npaug yog tias lawv tshwm sim hauv cov yuam sij sib xyaw.

Puas tuaj yeem ua haujlwm rov qab tus nqi null hauv Oracle?

Yog - a muaj nuj nqi tuaj yeem rov qab los a null 'ua piv txwv'. Tsis yog rov qab los a nqi null . Dua - cov muaj nuj nqi thiab lwm yam code ua TSIS sawv cev rau kev siv lub cev. Qhov 'x^2' yog ib qho kev qhia thiab tsis siv tau Oracle syntax tsis yog nws ib qho Oracle SQL ntawv Muaj nuj nqi.

Pom zoo: