Download presentation
Presentation is loading. Please wait.
Published byAmy Gregory Modified over 9 years ago
1
1 ORACLE SQL iSQLPlus & SQLPLUS Statements
2
1-2 iSQLPlus is a application software layer that allows programmers to utilize SQL to make changes to the database Log in to iSQL*Plus. Describe the table structure. Edit your SQL statement. Execute SQL from SQL*Plus. Save SQL statements to files and append SQL statements to files. Execute saved files. Load commands from file to buffer to edit. iSQLPlus is a application software layer that allows programmers to utilize SQL to make changes to the database Log in to iSQL*Plus. Describe the table structure. Edit your SQL statement. Execute SQL from SQL*Plus. Save SQL statements to files and append SQL statements to files. Execute saved files. Load commands from file to buffer to edit. iSQLPlus Environment
3
1-3 SQL and iSQL*Plus Interaction SQL*Plus SQL Statements Buffer Server Query Results SQL*Plus Commands Commands Formatted Report
4
1-4 SQL Statements Versus iSQL*Plus Commands SQLstatements SQL A languageA language ANSI standardANSI standard Keyword cannot be abbreviatedKeyword cannot be abbreviated Statements manipulate data and table definitions in the databaseStatements manipulate data and table definitions in the databaseiSQL*Plus An online environmentAn online environment Oracle proprietaryOracle proprietary Keywords can be abbreviatedKeywords can be abbreviated Commands do not allow manipulation of values in the databaseCommands do not allow manipulation of values in the database SQLbufferSQL*PluscommandsSQL*Plusbuffer
5
1-5 Log in to SQL*Plus. Describe the table structure. Edit your SQL statement. Execute SQL from SQL*Plus. Save SQL statements to files and append SQL statements to files. Execute saved files. Load commands from file to buffer to edit. Log in to SQL*Plus. Describe the table structure. Edit your SQL statement. Execute SQL from SQL*Plus. Save SQL statements to files and append SQL statements to files. Execute saved files. Load commands from file to buffer to edit. Things you can do in iSQL*Plus
6
1-6 Logging In to SQL*Plus From Windows environment (Using the client software):From Windows environment (Using the client software): From command line:From command line: sqlplus [username[/password sqlplus [username[/password [@database]]] [@database]]] From Windows environment (Using the client software):From Windows environment (Using the client software): From command line:From command line: sqlplus [username[/password sqlplus [username[/password [@database]]] [@database]]]
7
1-7 Logging In to iSQL*Plus From Browser: http://lovelace.cs.missouriwestern.edu:5560/isqlplus /From Browser: http://lovelace.cs.missouriwestern.edu:5560/isqlplus / From Browser: http://lovelace.cs.missouriwestern.edu:5560/isqlplus /From Browser: http://lovelace.cs.missouriwestern.edu:5560/isqlplus /
8
1-8 SQL Commands Creating a table Create Table Dept ( DEPT_NO NUMBER(2) Not Null, DNAME VARCHAR2(14), LOCVARCHAR2(13), PRIMARY KEY (DEPT_NO)); Create Table Dept ( DEPT_NO NUMBER(2) Not Null, DNAME VARCHAR2(14), LOCVARCHAR2(13), PRIMARY KEY (DEPT_NO));
9
1-9 Displaying Table Structure Use the SQL*Plus DESCRIBE command to display the structure of a table. DESC[RIBE] tablename
10
1-10 Displaying Table Structure SQL> DESCRIBE dept Name Null? Type ----------------- -------- ------------ DEPTNO NOT NULL NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13) Name Null? Type ----------------- -------- ------------ DEPTNO NOT NULL NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13)
11
1-11 Running a Script File from iSQLPlus A.Select ‘Load Scrip 1. make sure your script is a text file (.txt or.sql) B.Browse to find your script, then select it C.Hit Execute D.Review results at the bottom of page OR Copy/Paste script into window, then Execute A.Select ‘Load Scrip 1. make sure your script is a text file (.txt or.sql) B.Browse to find your script, then select it C.Hit Execute D.Review results at the bottom of page OR Copy/Paste script into window, then Execute
12
1-12 iSQLPlus Environment Go to preferences to set environment Go to History to see and access previously ran scripts
13
1-13 Set Display Commands Set display Commands to ON - this will allow the command to display before the result. This is the required format for turning in homework.
14
1-14 Summary Use iSQL*Plus as an environment to: Execute SQL statements Edit SQL statements Use iSQL*Plus as an environment to: Execute SQL statements Edit SQL statements
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.