1 ORACLE SQL iSQLPlus & SQLPLUS Statements. 1-2 iSQLPlus is a application software layer that allows programmers to utilize SQL to make changes to the.

Slides:



Advertisements
Similar presentations
Copyright  Oracle Corporation, All rights reserved. 1 Writing Basic SQL Statements.
Advertisements

Introduction To SQL Lynnwood Brown President System Managers LLC Copyright System Managers LLC 2003 all rights reserved.
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
Multiple Tiers in Action
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
Writing Basic SQL statement 2 July July July Create By Pantharee Sawasdimongkol.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
Oracle SQL*plus John Ortiz. Lecture 10SQL: Overview2 Overview  SQL: Structured Query Language, pronounced S. Q. L. or sequel.  A standard language for.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
Chapter 1 Writing Basic SQL Statements Important Legal Notice:  Materials on this lecture are from a book titled “Oracle Education” by Kochhar, Gravina,
Copyright  Oracle Corporation, All rights reserved. Introduction.
Module 2: Using Transact-SQL Querying Tools. Overview SQL Query Analyzer Using the Object Browser Tool in SQL Query Analyzer Using Templates in SQL Query.
1 Copyright © 2009, Oracle. All rights reserved. B Table Descriptions.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Chapter 2 Basic SQL SELECT Statements Oracle 10g: SQL.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
1 Copyright © 2006, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement.
CS450 HW2Page 1 Homework #2  Due the midnight of April 15th.  100 Points  In this homework, you create an SQL script to build the MOVIES database according.
Information Systems Today (©2006 Prentice Hall) MySQL 1CS3754 Class Note #8, Is an open-source relational database management system 2.Is fast and.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
Much from Introduction to Oracle:SQL and PL/SQL, Oracle University 1 Basic SQL Statements Oracle/SQL Plus Commands Kroenke, 11 th ed., Chapter Two.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Chapter 2: SQL – The Basics Objectives: 1.The SQL execution environment 2.SELECT statement 3.SQL Developer & SQL*Plus.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
Copyright  Oracle Corporation, All rights reserved. Writing Basic SQL Statements.
Copyright س Oracle Corporation, All rights reserved. I Introduction.
RELATSIOONILISED ANDMEBAASID(alg) SQLi VÕIMALUSED.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
CS 3630 Database Design and Implementation. Assignment 3 Style! Agreement between database designer and the client. UserName1_EasyDrive UserName2_EasyDrive.
 SQL statements are not case sensitive.  SQL statements can be on one or more lines.  Keywords cannot be abbreviated or split across lines.
DataMAPPER - Applied Database Tech. 이화여대 과학기술대학원 석사 3 학기 992COG08 김지혜.
Creating Tables and Inserting Records -- Not easy to edit! -- check constraints! Create table test1 ( C1 char(5) primary key, C2 Varchar2(15) not null.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Stored Procedures. Definition a stored procedure is a set of Structured Query Language (SQL) statements with an assigned name that's stored in the database.
Copyright  Oracle Corporation, All rights reserved. Introduction.
Prince Sultan University Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
11 Including Constraints Objectives At the end of this lesson, you will be able to: Describe constraints Create and maintain constraints At the.
1 Writing Basic SQL Statements. 1-2 Objectives At the end of this lesson, you should be able to: List the capabilities of SQL SELECT statements Execute.
PowerBuilder Online Courses - by Prasad Bodepudi Database Painter Primary & Foreign Keys Extended Attributes PowerBuilder System Tables Database Profiles.
SQL in Oracle. Set up Oracle access at IU You need to install Oracle Client: – – For windows:
1 Copyright © Oracle Corporation, All rights reserved. Writing Basic SQL SELECT Statements.
© 2007 by Prentice Hall2-1 Introduction to Oracle 10g Chapter 2 Overview of SQL and SQL*Plus James Perry and Gerald Post.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
1 Introduction to SQL *Plus Oracle SQL Interface MIS309 Database Systems.
Basic SQL*Plus edit and execute commands SQL*Plus buffer and built-in editor holds the last SQL statement Statements are created in free-flow style and.
1-1 Copyright  Oracle Corporation, All rights reserved. Logging In to SQL*Plus From Windows environment:From Windows environment: From command line:From.
Command-line Oracle Logon to your ORACLE account using the instructions contained in this slideshow. Create the tables with your last name in place of.
Installation Oracle 11g Express 2 double click the "setup" button to install the Oracle.
Chapter Four Objectives Introduction to SQL Introduction to iSQL*PLUS Types of SQL statements Concepts of DDL & DML Data Manipulation Language (DML)
Copyright  Oracle Corporation, All rights reserved. Introduction.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Copyright س Oracle Corporation, All rights reserved. 1 Writing Basic SQL Statements.
1 Copyright © 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement.
D Copyright © 2009, Oracle. All rights reserved. Using SQL*Plus.
Dept. of Computer & Information Sciences
3 A Guide to MySQL.
SQL and SQL*Plus Interaction
Using SQL*Plus.
SQL in Oracle.
Using SQL*Plus.
ORACLE SQL Developer & SQLPLUS Statements
Using SQL*Plus.
SQLPLUS: Oracle SQL Interface
Turn on spool and save to file a.txt
Presentation transcript:

1 ORACLE SQL iSQLPlus & SQLPLUS Statements

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

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

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

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

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 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

1-7 Logging In to iSQL*Plus From Browser: /From Browser: / From Browser: /From Browser: /

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));

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

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)

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

1-12 iSQLPlus Environment Go to preferences to set environment Go to History to see and access previously ran scripts

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.

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