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ITYSPJSNOPNOJNOQTYQTY1J1SNO2J1P1SNO3J1SNO4JNO5S1JNO4.:1235.6.=RSAB7.8.3SQL1.SQLBA.B.C.D.2.SQLSELECTINSERTUPDATEDELETEAA.SELECTB.INSERTC.UPDATED.DELETE3.CA.B.C.D.4.SQLCREATEDROPALTERCA.B.C.D.5.SQLBA.DELETEB.DROPC.CLEARD.REMOVE6.SQLVIEWAA.B.C.D.7.SQLDA.CREATETABLEB.DROPVIEWC.CREATEVIEWD.GRANT8.SCA.DELETETABLES(--deletefroms)B.DELETESC.DROPTABLESD.DROPS9.SCNCA.ADDTABLESCNCHARB.ADDTABLESALTERCNCHAR7C.ALTERTABLESADDCNCHARD.ALTERTABLESADDCNCHAR10.SSSnameSexAgeSSSQLBA.DELETEAgefromSB.ALTERTABLESDROPAgeC.UPDATESAgeD.ALTERTABLESAge11.SSSNAMESAGECCCNAMESCSCGRADESSNAMESAGECCNAMEACCESS20SQLSELECTSNAMEFROMSCSCWHEREWHEREAA.S.S#=SC.S#andC.C#=SC.C#andSAGE=20andCNAME=ACCESSB.S.S#=SC.S#andC.C#=SC.C#andSAGEin=20andCNAMEinACCESSC.SAGEin=20andCNAMEinACCESSD.SAGE=20andCNAME=ACCESS12.SSSNCNgradeSNCNgrade010080SDA.ADDINTOSVALUES80B.INSERTINTOSVALUES80C.ADDINTOSVALUES80D.INSERTINTOSVALUES8013.SSSNCNgradeSNCNgrade010085AA.UPDATESSETgrade85WHERESNANDCNB.UPDATESSETgrade85WHERESNANDCNC.UPDATEgrade85WHERESNANDCND.UPDATEgrade85WHERESNANDCN14.SQLDA.B.C.D.15.SQLCA.B.C.D.16.SSSNAMESEXCCCNAMESCSCGRADESSNAMESEXCCNAMESQLSELECTSNAMEFROMSCSCWHEREWHEREAA.S.S#=SC.S#andC.C#=SC.C#andSEX=andCNAME=B.S.S#=SC.S#andC.C#=SC.C#andSEXinandCNAMEinC.SEXandCNAMED.S.SEX=andCNAME=17.SQLSCCREATETABLESCS#CHAR6NOTNULLC#CHAR3NOTNULLSCOREINTEGERNOTECHAR20SCBA.20100911160B.200823101NULLNULLC.NULL10380D.201132NULL8618.SSSNAMESEXCCCNAMESCSCGRADEComputerDA.SB.SSCC.CSCD.SCSC8(1)B(2)A(3)C(4)C(5)B(6)A(7)D(8)C(9)C(10)B(11)A(12)D(13)A(14)D(15)C(16)A(17)B(18)D1.SQL1SQLDDLDMLDCL2SQLSQL3SQL4SQL52.SQLSQLSQLCREATETABLEALTERTABLEDROPTABLECREATEINDEXDROPINDEXSQLCREATEVIEWDROPVIEW3.SQL33SS(SNOSNAMESTATUSCITY)SCREATETABLES(SNOCHAR(3)SNAMECHAR(10)STATUSCHAR(2)CITYCHAR(10))P(PNOPNAMECOLORWEIGHT)PCREATETABLEP(PNOCHAR(3)PNAMECHAR(10)COLORCHAR(4)WEIGHTINT)J(JNOJNAMECITY)JCREATETABLEJ(JNOCHAR(3)JNAMECHAR(10)CITYCHAR(10))SPJ(SNOPNOJNOQTY)SPJCREATETABLESPJ(SNOCHAR(3)PNOCHAR(3)JNOCHAR(3)QTYINT)4.SQL331J1SNOSELECTSNOFROMSPJWHEREJNO=J12J1P1SNOSELECTSNOFROMSPJWHEREJNO=J1ANDPNO=P13J1SNOSELECTSNOFROMSPJWHEREJNO=J1ANDPNOIN(SELECTPNOFROMPWHERECOLOR=)SELECTSNOFROMSPJP9WHEREJNO=J1ANDSPJ.PNO=P.PNOANDCOLOR=4JNOSQLSELECTJNOFROMJWHERENOTEXISTS(SELECT*FROMSPJWHERESPJ.JNO=J.JNOANDSNOIN(SELECTSNOFROMSWHERECITY=)ANDPNOIN(SELECTPNOFROMPWHERECOLOR=))SELECTJNOFROMJWHERENOTEXISTS(SELECT*1FROMSPJ,S,PWHERESPJ.JNO=J.JNOANDSPJ.SNO=S.SNOANDSPJ.PNO=P.PNOANDS.CITY=ANDP.COLOR=)J5S1JNOSQLSELECTDISTINCTJNOFROMSPJSPJZWHERENOTEXISTS(SELECT*FROMSPJSPJXWHERESNO='S1'ANDNOTEXISTS(SELECT*FROMSPJSPJYWHERESPJY.PNO=SPJX.PNOANDSPJY.JNON=SPJZ.JNOANDSPJY.SNO=S110ANDSPJY.SNO='S1'))5.3SQL123S14J256789S5J4P6S310S211(S2J6P4200)(1)SELECTSNAME,CITYFROMS;(2)SELECTPNAME,COLOR,WEIGHTFROMP;(3)S1SELECTJNOFROMSPJWHERESNO=S1;(4)J2SELECTP.PNAME,SPJ.QTYFROMP,SPJWHEREP.PNO=SPJ.PNOANDSPJ.JNO='J2';(5)SELECTDISTINCTPNOFROMSPJWHERESNOINSELECTSNOFROMSWHERECITY='';(6)SELECTJNAMEFROMJ,SPJ,SWHEREJ.JNO=SPJ.JNOANDSPJ.SNO=S.SNOANDS.CITY='';SELECTJNAMEFROMJWHEREJNOIN(SELECTJNO11FROMSPJ,SWHERESPJ.SNO=S.SNOANDS.CITY='');(7)SELECTJNOFROMJWHERENOTEXISTS(SELECT*FROMSPJWHERESPJ.JNO=J.JNOANDSNOIN(SELECTSNOFROMSWHERECITY=))SELECTJNOFROMJWHERENOTEXISTS(SELECT*1FROMSPJ,SWHERESPJ.JNO=J.JNOANDSPJ.SNO=S.SNOANDS.CITY=)(8)UPDATEPSETCOLOR=''WHERECOLOR='';(9)S5J4P6S3UPDATESPJSETSNO='S3'WHERESNO='S5'ANDJNO='J4'ANDPNO='P6';(10)S2DELETEFROMSPJWHERESNO='S2';DELETEFROMSWHERESNO='S2';SPJS2SS2(11)(S2J6P4200)INSERTINTOSPJ(SNO,JNO,PNO,QTY)VALUES(S2J6P4200);INSERTINTOSPJVALUES(S2P4J6200);6.SQL127.(1)(2)(3)(4)8.3.5.1S_GCREATVIEWS_G(SnoGavg)ASSELECTSnoAVG(Grade)FROMSCGROUPBYSno9.3.5.313.5.3S_G10.11.SNOPNOQTY12S1CREATEVIEWV_SPJASSELECTSNO,PNO,QTYFROMSPJWHEREJNO=SELECTJNOFROMJWHEREJNAME='';(1)SELECTPNO,QTYFROMV_SPJ;(2)S1SELECTPNO,QTY/*S1*/FROMV_SPJWHERESNO='S1';41.DA.B.C.D.132SQLDA.B.C.D.3SQLGRANTREMOVECA.B.C.D.4.AA.B.C.D.(1)D(2)D(3)C(4)A1.2.3.1)2)C2DACB1MAC3)4)DBA5)9.24.*5.SQLSQLGRANTREVOKEG