Partial preview of the text
Download SQL Notes HANDWRITTEN and more Study notes Software Development in PDF only on Docsity!
“SR Inbar — . a — PatoBase Tt_is_on on. nrized collection. of doda. ee Bo thot be easily accegged, i “= -—|To_manage. Depee. databases, DEMS ( DataBase . : _ ae — Management. System) ane used. -_ _ a a ; DBMS —_ pata sase——_—__— — _* | Relational DBMS an i - ___ + _| Non- Relational DBMS ee -_~ Relational DBMs *- Tn this pBMs, data Stored in i table Format. a RollNo Name class dai Sth Aman 4th Anu4 5th Ram sth cla YP F -_ (Relational DBMS) For Example -- MyS@L , Onacle. |Non- Relational DBMS :- Tn this DBMS data is | &toned in key -Value pair. z : “RollNo”: 1 a ¢ Cloas”? Moh”, ce . =e name”: “Jai” F t CNon- Relational DBMS) a = -fna_Examble := Mongod®, Reds ___| S@L is used fon _ubdate, delete, insent data_in ____ ____| table oa Relational DataBase. RDBMS Relational DataBase aan Sat INSERT INTO Command. 2 a al > —t —_—_ det - oi | Ste. rec diy insent i into tables. | a = Plsytons- = tees. Se ee oe Column2_...._) NIALUES ( valuet .valuez... )3 A how of database table is known as necoad Oh a tuble attnibute Fon Examble :- TNsert INTo user (FinatName, LoatName, Emoailid ,Pasawond) abe #123.) 3 ; amilia |e d [sau SELECT Command = a (e ig. ere i sib —data_from +he -oble __ aon Syptons — fe Column. Colurnn2 From +tobleName + ¢ | To Select Comblete table, ae * Ustan) SELECT * From toblename 3_ Guombie: @preggammen gale LlagtName | Pasawiond Vai Kumas 122 ) oO si ng bh Obc : amit Shosma | yz Toble ‘- USER se Alese = ee | coon! To ig haat Abec’p pe ables Prom = _—— 7 Ss | Which data Fetched. ies = ~ WHERE + = Be nye 4o_gtlten neconds “hosed on} 2 = as Wa Sa givian__condition P[oTNs~ Th is used to combine data $ Prom | tables based on a common field Gove BY = T+ fz Urged +o qnoub neconds based | On our Aequinemertt | HAVING -— 1+ Te used +0 Filten groups: [ORDER BY 5 Tt is used +o sont the ae in ascending Oh deacending onder. SELECT -— Th ip used to retaieves data Faom Ashe table. Wehr eis tee ee ae Lomrre- T+ ta used to shecigy how wnany - OWA Che netunned. mane ee | 7 aver Belneon ER - nd UPDATE — ALTER UPDATE Tt is a ppl Tt is a DMI | Tt is used fon Th is used Fok _ | _laodding , delet vand Ubdating ‘tgs dato modifying attaibutes in “the existing Aable 2 the sniee Changes ase made Changes ofe made fo the tale +o the data. Stnuctune By default, all the — Tt geta the Sbecitied Value to the 4uble values in the tuple ane initialized o& if Ubd ate Envtnan Command jA null if the ALTER is ad SQLIWHERE CLAUSE T+ fg used to filteh rows ina table based — fb = on_a__gbecified condition. eS yaioe —________ me Ae —— SELECT column-name 5 eae 3 = ——FRON_+able-name - __|_ ________ WHERE. condition’ __| Examble s- — = | ___|Fiastnome {LastName | Ape Wai Kumah. \q Taya Singh 20 Amit | Shama | _? é Table :- UsER bea | a a ea Z| | a S| a sal + —_ — —— > suse IN ne ee —__— ——- eee Tt in Nel nape! Anti tabi ee ee — (ot Oa ian Thnaiin teiln tb cinn a niet ed Nalues ( values »Malue 2,25 Note = There must be the a as the ame number of Columns shecitiod Command “— | oe =a feet a SAL NOLL values re ee oe La | a oa Ss Ue | rar i3_ finned th hobuendiths, missing on unknoton a— —$__ | data. i ‘ 1 Lnlotes— Null is, different from _zeno_of_embty String. “Inseat Null value INSERT INTO tablename( column ,column2,.) VALUES Cvoluet, Null, -- 95. —<—<—— Ehnom table nome WHERE column? TS NULL 4 fa) PROG VAC bs pint a SELECT Column4 , column? ,_ = FRomM +table-name ; ac, Ey 14 ers -NOT_ NULLS Page Ne = Oasarvy