Puas yog SQL case insensitive?
Puas yog SQL case insensitive?

Video: Puas yog SQL case insensitive?

Video: Puas yog SQL case insensitive?
Video: 90% पुरुष इस सेks पोजीशन//psychology facts in hindi//manovigyanic facts// manovigyan// 2024, Tej zaum
Anonim

SQL cas rhiab heev:

Cov SQL ntawv Keywords yog cas - insensitive (XEEM, LOS NTAWM, NTAWM NO, AS, ORDER BY, HAVING, GROUP BY, thiab lwm yam), tab sis feem ntau yog sau rau hauv tag nrho cov peev. Txawm li cas los xij, hauv qee qhov chaw cov lus thiab kab npe yog cas - rhiab heev . MySQL muaj qhov kev xaiv teeb tsa los pab lossis lov tes taw nws.

Raws li, yog vim li cas SQL case insensitive?

Cov SQL ntawv lus specification hais tias " SQL ntawv cov cim lus" (uas yog siv rau cov cim thiab SQL ntawv keywords) yog cas - insensitive . Yog SQL ntawv tau cas - rhiab heev , nws yuav tsis ua raws li tus qauv lus. Yog li koj yuav tau hloov lub SQL ntawv txheem, los yog lwm yam muaj ib tug rebellious streak.

Qhov thib ob, kuv yuav ua li cas thiaj paub yog tias kuv lub SQL database yog qhov teeb meem? Hauv Management studio, txoj nyem rau ntawm Instance nyob rau hauv cov khoom explorer thiab ces nias rau ntawm "properties" rau saib cov server khoom. Hauv seem "General" saib cov collation. Lub neej ntawd cas insensitive kev teeb tsa yog SQL_Latin1_General_CP1_CI_AS. Cov case sensitive kev teeb tsa yog Latin1_General_CS_AS.

Tsis tas li ntawd, kuv yuav ua li cas thiaj li tsis muaj teeb meem hauv SQL?

Case insensitive SQL SELECT: Siv cov haujlwm sab saud lossis qis dua xaiv * los ntawm cov neeg siv uas qis dua (first_name) = 'fred'; Raws li koj tau pom, tus qauv yog mus ua daim teb uas koj tab tom nrhiav rau hauv tus lej loj lossis tus lej me, thiab tom qab ntawd ua koj txoj hlua nrhiav kuj yog tus tsiaj ntawv loj lossis tus lej me kom phim rau SQL ntawv muaj nuj nqi koj tau siv.

Puas yog cov peev tseem ceeb hauv SQL?

SQL ntawv Case rhiab heev: Cov SQL ntawv Cov ntsiab lus tseem ceeb yog cov ntaub ntawv tsis txaus ntseeg (XL, NTAWM, NTAU, NTAU NTAWV, AS, ORDER BY, HAVING, GROUP BY, thiab lwm yam), tab sis feem ntau yog sau rau hauv tag nrho. peev . Txawm li cas los xij, hauv qee lub rooj teeb tsa thiab cov npe kab ntawv yog qhov tseem ceeb. MySQL muaj qhov kev xaiv teeb tsa los pab lossis lov tes taw nws.

Pom zoo: