Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
USINGSQLDeveloperatUHD
SQL(StructuredQueryLanguage)allowsyoutostoreandretrievedatabaseinformation.AtUHD,Oracle SQLDeveloperisoneofthetoolsusedforSQLdatabasework. OracleSQLDeveloperisagraphicaltoolfordatabasedevelopment.WithSQLDeveloper,youcan browsedatabaseobjects,runSQLstatementsandSQLscripts,andeditanddebugPL/SQLstatements. Youcanalsorunanynumberofprovidedreports,aswellascreateandsaveyourown.SQLDeveloper enhancesproductivityandsimplifiesyourdatabasedevelopmenttasks.
To Change the Password: IfforanyreasonyouwouldliketochangeyourOraclepasswordinthefuture,youwillaccessSQLPlus todothisaswell. 1. 2. 3. 4. 5. 6. AccessSQLPlus. Youwillbetakentoascreenthatwillpromtyoutoenteryourusername. EnteryourUHDNetworkUsernameandOraclePassword.PressEnter. Typethewordpassword,withoutquotes. YouwillbepromptedtoenteryourOldPasswordandthentotypeandRetypetheNewPassword. TypeexitandpressEntertocloseSQLPlus.
Note:ChangingthepasswordinOracleDoesNotchangeyourUHDNetworkIDorpassword.
Accessing the Oracle SQL Developer
1. LocatetheprogrambygoingtoAllPrograms>OracleOraClient11g_home1>Application Development>SQLDeveloper.
2. ThefirsttimethatyouaccessSQLDeveloper,youwillneedtoSavethedatabaseconnection: a. RightClickConnections.
b. SelectNewConnection.
DoubleClick
EnterPassword
DoubleClick
3. SelectUHDandthenTables.
4. Youwillseealistoftables.
Toviewthecolumns: 1. Doubleclickatablename.
Executing SQL
BelowarehelpfultoolsandbuttonsthatwillhelpexecuteSQLqueriesinOracleDeveloper. WritesimpleSQL:
ExecutetheSQL:
10
ErasetheSQL:
StoptheSQL:
11
12
Sorttheoutputbycolumn:
ExporttheOutput:
Note:Forlargefiles,selectCSVastheexportfiletype.CSVfilescanbeopenedandreadbyMSExcel.
13
OpennewSQLFile:
SavetheSQLFile:
14 Updated May 16, 2012
OpenthesavedSQLFile:
ViewSQLHistory:
DoubleClick
15
Examples
TrytoexecutetheexamplequeriesbelowusingOracleDeveloper.Youwillfindthesolutionsto Examples#1#3onthefollowingpages. Question#1ListStudentBannerID,StudentFirstname,StudentLastnameofalltheundergraduate studentswhohaveadmittedinFall2011(201210)andattendedHighSchoolH01059OutofTexas HighSchool.
Question#2FindthenumberofstudentswhohavetheattributecodeTSIC(TSIContract)inthe term201210.
Question#3ListthecourseswhichareofferedinthecollegeHSfortheterm201210.
16
Examples Answers
Answer#1:
SELECTdistinctwadmabc_ban_idas"BannerId", wadmabc_lnameas"LastName", wadmabc_fnameas"FirstName" FROMUHD.wadmabc WHEREwadmabc_term_code='201210' ANDwadmabc_stu_levl='00' ANDwadmabc_high_sch_infoLIKE'%H01059%';
17
18
19