1 / 14

ORACLE SQL iSQLPlus & SQLPLUS Statements

ORACLE SQL iSQLPlus & SQLPLUS Statements. iSQLPlus Environment. 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.

walt
Télécharger la présentation

ORACLE SQL iSQLPlus & SQLPLUS Statements

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ORACLESQLiSQLPlus & SQLPLUS Statements

  2. iSQLPlus Environment 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 bufferto edit.

  3. SQL Statements SQL Statements Server Query Results SQL*Plus Commands Formatted Report SQL and iSQL*Plus Interaction Buffer SQL*Plus

  4. SQL Statements Versus iSQL*Plus Commands • SQL • A language • ANSI standard • Keyword cannot be abbreviated • Statements manipulate data and table definitions in the database • iSQL*Plus • An online environment • Oracle proprietary • Keywords can be abbreviated • Commands do not allow manipulation of values in the database SQL statements SQL buffer SQL*Plus commands SQL*Plus buffer

  5. Things you can do in iSQL*Plus • 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 bufferto edit.

  6. Logging In to SQL*Plus • From Windows environment (Using the client software): • From command line: sqlplus [username[/password [@database]]]

  7. Logging In to iSQL*Plus • From Browser: http://lovelace.cs.missouriwestern.edu:5560/isqlplus/

  8. SQL CommandsCreating a table • Create Table Dept ( • DEPT_NO NUMBER(2) Not Null, • DNAME VARCHAR2(14), • LOC VARCHAR2(13), • PRIMARY KEY (DEPT_NO));

  9. Displaying Table Structure • Use the SQL*Plus DESCRIBE command to display the structure of a table. DESC[RIBE] tablename

  10. Displaying Table Structure SQL> DESCRIBE dept Name Null? Type ----------------- -------- ------------ DEPTNO NOT NULL NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13)

  11. Running a Script File from iSQLPlus • Select ‘Load Scrip 1. make sure your script is a text file (.txt or .sql) • Browse to find your script, then select it • Hit Execute • Review results at the bottom of page • OR • Copy/Paste script into window, then Execute

  12. iSQLPlusEnvironment Go to preferences to set environment Go to History to see and access previously ran scripts

  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. Summary • Use iSQL*Plus as an environment to: • Execute SQL statements • Edit SQL statements

More Related