Cov txheej txheem:

Dab tsi yog ib pawg ntawm subqueries?
Dab tsi yog ib pawg ntawm subqueries?

Video: Dab tsi yog ib pawg ntawm subqueries?

Video: Dab tsi yog ib pawg ntawm subqueries?
Video: Vim peb tsis yog nej pab - Yis Lauj / Tub yias Lauj /Tub Lauj [ Official music ] 17/2/2023 2024, Kaum ib hlis
Anonim

Hom Subqueries

Ib kab subquery : Rov qab xoom los yog ib kab. Ntau kab subquery : Rov qab los ib los yog ntau kab. Ntau kab subqueries : Rov qab los ib los yog ntau kab. Sib txheeb subqueries : Siv ib lossis ntau kab nyob rau sab nrauv SQL nqe lus.

Xav txog qhov no, pes tsawg hom subqueries muaj nyob rau hauv SQL?

Hauv tshooj no, kawm txog peb qhov kev faib dav dav ntawm a subquery hauv SQL : Ib kab, ntau kab thiab sib cuam tshuam subqueries . Muaj peb qhov dav hom ntawm a subquery hauv SQL.

subquery ua dab tsi? A subquery yog ib qho lus nug hauv lwm cov lus nug, tseem hu ua nested query. A subquery yog siv los xa cov ntaub ntawv ntawd yuav siv nyob rau hauv cov lus nug tseem ceeb raws li ib qho xwm txheej kom txwv tsis pub cov ntaub ntawv rov qab. Subqueries yog siv nrog SELECT, INSERT, UPDATE, thiab DELETE nqe lus.

Tsis tas li ntawd, qhov sib txawv ntawm kev koom nrog thiab subqueries yog dab tsi txawv ntawm subqueries?

Koom nrog piv Subqueries . Koom nrog thiab subqueries ob leeg yog siv los muab cov ntaub ntawv los ntawm txawv cov rooj rau hauv ib qho txiaj ntsig. Subqueries tuaj yeem siv los xa rov qab ib qho scalar (ib zaug) tus nqi lossis kab teeb; hos, koom yog siv los rov qab kab. Ib qho kev siv rau a subquery tej zaum yuav yog xam tus nqi ntawm kev siv hauv a nug

Subquery yog dab tsi thiab nws cov yam ntxwv tseem ceeb yog dab tsi?

A subquery yog cov lus nug (qhia raws li SELECT nqe lus) uas nyob hauv lwm cov lus nug. Cov lus nug sab hauv los yog subquery yog ib txwm ua ntej. Cov zis ntawm cov lus nug sab hauv yog siv los ua cov lus nug sab nraud.

Pom zoo: