Dept. of Computer & Information Sciences

Slides:



Advertisements
Similar presentations
Basic SQL Introduction Presented by: Madhuri Bhogadi.
Advertisements

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.
Introduction to Structured Query Language (SQL)
SQL components In Oracle. SQL in Oracle SQL is made up of 4 components: –DDL Data Definition Language CREATE, ALTER, DROP, TRUNCATE. Creates / Alters.
A Guide to SQL, Seventh Edition. Objectives Embed SQL commands in PL/SQL programs Retrieve single rows using embedded SQL Update a table using embedded.
Introduction to Structured Query Language (SQL)
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.
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
Chapter 5 Data Manipulation and Transaction Control Oracle 10g: SQL
ORACLE Using ORACLE 8 SQL using ORACLE 8 PL/SQL using ORACLE 8.
Agenda Journalling More Embedded SQL. Journalling.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Controlling User Access. Objectives After completing this lesson, you should be able to do the following: Create users Create roles to ease setup and.
1 Database Administration. 2 Objectives  Understand, create, and drop views  Grant and revoke users’ privileges  Understand and obtain information.
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Oracle 11g DATABASE DEVELOPMENT LAB1. Introduction  Oracle 11g Database:-  Oracle 11g database is designed for some features, which helps to the organizations.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
Personal Oracle8i Create a new user Create a new table Enter data into a new table Export & import data Start and exit SQL Plus SQL Plus Syntax.
ITBIS373 Database Development Lecture 3a - Chapter 3: Using SQL Queries to Insert, Update, Delete, and View Data.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Information Building and Retrieval Using MySQL Track 3 : Basic Course in Database.
Prince Sultan University Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Controlling User Access. 2 home back first prev next last What Will I Learn? Compare the difference between object privileges and system privileges Construct.
Personal Oracle8i Create a new user Create a new table Enter data into a new table Export & import data Start and exit SQL Plus SQL Plus Syntax.
Oracle 9i. Agenda Start and exit SQL Plus (General) Start and exit SQL Plus (Tah 1006) Syntax Create a new user Create a new table Enter data into a new.
Transactions, Roles & Privileges Oracle and ANSI Standard SQL Lecture 11.
Use of Data Security Commands Security: Information is vital to success, but when damaged or in the wrong hands, it can threaten success. OREACLE provides.
Chapter 13Introduction to Oracle9i: SQL1 Chapter 13 User Creation and Management.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
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.
 CONACT UC:  Magnific training   
Software-Projekt 2008 Seminarvortrag“Short tutorial of MySql“ Wei Chen Verena Honsel.
Oracle 11g: SQL Chapter 5 Data Manipulation and Transaction Control.
D Copyright © 2009, Oracle. All rights reserved. Using SQL*Plus.
Oracle: Programming Languages SQL and PL/SQL Introduction Toomas Lepikult
3 A Guide to MySQL.
ASP.NET Programming with C# and SQL Server First Edition
Controlling User Access
Database Languages.
A Guide to SQL, Seventh Edition
TABLES AND INDEXES Ashima Wadhwa.
SQL and SQL*Plus Interaction
Using SQL*Plus.
Chapter 1 Introduction.
Introduction to MySQL.
Permissions to database objects Indexes RUNSQLSTM Referential Constraint options ON DELETE RESTRICT ON DELETE CASCADE ON DELETE SET DEFAULT Lab.
SQL in Oracle.
Current outstanding balance
Introduction to Oracle9i: SQL
Using SQL*Plus.
ORACLE SQL Developer & SQLPLUS Statements
Chapter 7 Working with Databases and MySQL
Chapter 8 Working with Databases and MySQL
Chapter 1 Introduction.
مقدمة في قواعد البيانات
A Guide to SQL, Eighth Edition
SQL .. An overview lecture3.
Chapter 1 Introduction.
Chapter 1 Introduction.
Contents Preface I Introduction Lesson Objectives I-2
Using SQL*Plus.
SQLPLUS: Oracle SQL Interface
Permissions to database objects Indexes RUNSQLSTM Referential Constraint options ON DELETE RESTRICT ON DELETE CASCADE ON DELETE SET DEFAULT Lab.
Presentation transcript:

Dept. of Computer & Information Sciences Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems (ORACLE SQL*Plus)

SQL*Plus - Introduction SQL*Plus is essentially an interactive command editor which enables the user to interrogate the database, e.g.: CREATE, ALTER, and DROP tables. INSERT, UPDATE, and DELETE rows. Specify primary keys , foreign keys, and indexes. GRANT and REVOKE access privileges. In order to perform these functions, the user enters a series of SQL statements. ORACLE SQL*Plus 6

SQL*Plus - Getting Started When you open SQL*Plus, you will be promoted for Name, Password, & Host string. scott psu stddata ORACLE SQL*Plus 7

SQL*Plus - Getting Started If the previous information have been entered correctly, SQL*Plus displays its own command line prompt; by default, SQL>. Any SQL command can be entered here ORACLE SQL*Plus 8

SQL*Plus - Getting Help Full on-line help is available while using SQL*Plus. To get help: Select the help menu option, or Enter help at the SQL*Plus prompt ORACLE SQL*Plus 9

SQL*Plus - Entering and Executing SQL Statements SQL statements entered at the SQL*Plus prompt are held in a multi- line command buffer. Non-SQL statements (such as help) may be entered without changing the contents of the SQL buffer. The buffer retains the contents of the latest SQL statement until a new SQL statement is entered or the buffer is cleared using the clear buffer command. The contents of the SQL buffer can be edited using several commands. (see manual) ORACLE SQL*Plus 10

SQL*Plus - Entering and Executing SQL Statements An SQL statement is executed immediately if the last line of the statement is terminated with a semi-colon. Additionally, the statement currently in the SQL buffer can be executed by entering: A / (on its own), or The keyword run At the SQL*Plus prompt. ORACLE SQL*Plus 11

SQL*Plus - Saving Buffer Contents The contents of the SQL buffer can be saved in an operating system file by entering the command: save filename[.ext] [replace] If the .ext is omitted, the file will be given the extension .sql. The optional argument replace allows an existing file to be overwritten. Using the optional argument append instead of replace allows the contents of the SQL buffer to be appended to an existing file. ORACLE SQL*Plus 12

SQL*Plus - Retrieving and Executing SQL Files Either of the following commands can be issued at the SQL*Plus prompt: start filename[.ext] or @filename[.ext] In either case the specified file is executed and the final SQL statement in the file is retained in the buffer. ORACLE SQL*Plus 13

SQL*Plus - Retrieving a File into the SQL Buffer To load an SQL file into the buffer without executing it the following command may be issued: get filename[.ext] ORACLE SQL*Plus 14

SQL*Plus - Using a Text Editor To overcome the limitations of the SQL buffer, a host operating system text editor or notepad may be used instead. The main benefit of using a text editor (apart from its editing capabilities) is the ability to create files containing multiple SQL statements. Each statement (except optionally the last) must be terminated by a semi-colon. ORACLE SQL*Plus 15

SQL*Plus - Describing Tables The structure of any table within the database may be displayed by entering the command describe at the SQL*Plus prompt. Syntax: describe tablename The names and types of each column within the specified table will be displayed. ORACLE SQL*Plus 16

SQL*Plus - Quitting To quit SQL*Plus, either one of the following commands can be used: quit, or exit. Both commands automatically commit any outstanding changes to the database. ORACLE SQL*Plus 17