Preview

Sql Study Matetial

Powerful Essays
Open Document
Open Document
21631 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Sql Study Matetial
Oracle/SQL Tutorial1
Michael Gertz
Database and Information Systems Group
Department of Computer Science
University of California, Davis gertz@cs.ucdavis.edu http://www.db.cs.ucdavis.edu

This Oracle/SQL tutorial provides a detailed introduction to the SQL query language and the
Oracle Relational Database Management System. Further information about Oracle and SQL can be found on the web site www.db.cs.ucdavis.edu/dbs.
Comments, corrections, or additions to these notes are welcome. Many thanks to Christina
Chung for comments on the previous version.

Recommended Literature
George Koch and Kevin Loney: Oracle8 The Complete Reference (The Single Most Comprehensive Sourcebook for Oracle Server, Includes CD with electronic version of the book), 1299 pages, McGraw-Hill/Osborne, 1997.
Michael Abbey and Michael Corey: Oracle8 : A Beginner’s Guide [A Thorough Introduction for First-time Users], 767 pages, McGraw-Hill/Osborne, 1997.
Steven Feuerstein, Bill Pribyl, Debby Russell: Oracle PL/SQL Programming (2nd Edition),
O’Reilly & Associates, 1028 pages, 1997.
C.J. Date and Hugh Darwen: A Guide to the SQL Standard (4th Edition), Addison-Wesley,
1997.
Jim Melton and Alan R. Simon: Understanding the New SQL: A Complete Guide (2nd Edition,
Dec 2000), The Morgan Kaufmann Series in Data Management Systems, 2000.

1

revised Version 1.01, January 2000, Michael Gertz, Copyright 2000.

Contents
1. SQL – Structured Query Language
1.1. Tables
1.2. Queries (Part I)
1.3. Data Definition in SQL
1.4. Data Modifications in SQL
1.5. Queries (Part II)
1.6. Views

1
3
6
9
11
19

2. SQL*Plus (Minimal User Guide, Editor Commands, Help System)

20

3. Oracle Data Dictionary

23

4. Application Programming
4.1. PL/SQL
4.1.1 Introduction
4.1.2 Structure of PL/SQL Blocks
4.1.3 Declarations
4.1.4 Language Elements
4.1.5 Exception Handling
4.1.6 Procedures and Functions
4.1.7 Packages
4.1.8 Programming in PL/SQL
4.2. Embedded SQL and

You May Also Find These Documents Helpful

  • Good Essays

    Coronel, C., Morris, S., & Rob, P. (2013). Database systems: Design, implementation, and management (10th ed.). Boston, MA: Course Technology.…

    • 699 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Oracle Express is Oracle’s express edition of their SQL database. This edition has many different features that can be used. Some of those features include; Interactive reports, Declarative BLOB support, Enhanced report printing, adding to the theme repository, Optional runtime-only installation, improved security, Application date format, and Application builder refinements. These features are used to create…

    • 452 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Structured Query Language (SQL) is a standard database computer language used for querying, modifying and managing data in Relational Database Management Systems (RDBMS). SQL was developed in the 1970's by IBM to initially manipulate and retrieve data in IBM System R. The SQL language was standardized in 1986 by the American National Standards Institute (ANSI); however, later releases were released as International Organization for Standardization (ISO) standards.…

    • 612 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    pt2520 assignment 1

    • 466 Words
    • 2 Pages

    Let’s get the definition out the way, the standard meaning if you will SQL or “sequel” to some is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS). Now that we got that out the way, let’s get to the first question.…

    • 466 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Cis 515week 3

    • 1024 Words
    • 4 Pages

    Bibliography: (2012). Database systems: Design, implementation, and management. (10 ed.). United States of America: Joe Sabatino.…

    • 1024 Words
    • 4 Pages
    Good Essays
  • Better Essays

    Dbm 381 Week 1 Individual

    • 971 Words
    • 4 Pages

    Pratt, P.J., & Adamski, J.J. (2012). Concepts of database management (7th ed.). Retrieved from The University of Phoenix eBook Collection database.…

    • 971 Words
    • 4 Pages
    Better Essays
  • Satisfactory Essays

    Limits: Poor Basic replication regarding integration, Oracle real application testing, Enterprise Manager, Automatic Storage Management, Java Support, Temporal Database,SQL Pattern matching, Flashback Data archive, Data Masking, Application Security, Secure Application roles, and Proxy Authentication.…

    • 327 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    References: Coronel, C., Morris, S., & Rob, P. (2013). Database systems: Design, implementation, and management (10th ed.). Independence, KY: Cengage.…

    • 906 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Baum, David and others. “Oracle 25 Years of Technology Innovation.” Oracle Magazine, November/December, 2001, pp. 65-82.…

    • 26520 Words
    • 107 Pages
    Good Essays
  • Good Essays

    1.) There have been several versions of SQL created in the last 26 years. In 1986, SQL-86 (SQL-87) was first published. In 1989, SQL-89 was a minor revision made to the original SQL. In 1992, SQL-92 (SQL2) was a major revision to its previous version. In 1999, SQL-99 (SQL3) added regular expression matching, recursive queries, triggers, non scalar types and some object oriented features. In 2003, SQL-2003 introduced XML related features, standardized sequences, and columns with auto generated values. In 2006, SQL-2006 defined ways in which SQL can be used in conjunction with XML and it defined ways of importing and storing XML data in an SQL database, manipulating it within the database and publishing both XML and conventional SQL-data in XML form. It also enables applications to integrate into their SQL code the use of XQuery. In 2008, SQL-2008 Legalized ORDER BY outside cursor definitions, added INSTEAD OF triggers, and added the TRUNCATE statement. As of March 2012, the newest SQL was released its new features include AlwaysOn SQL Server Failover Cluster Instances and Availability Groups which provides a set of options to improve database availability, Contained Databases which simplify the moving of databases between instances, new and modified Dynamic Management Views and Functions, programmability enhancements including new Spatial features, Metadata discovery, Sequence objects and the THROW statement, performance enhancements such as ColumnStore Indexes as well as improvements to OnLine and Partition level operations and security enhancements including Provisioning During Setup, new permissions, improved role management and default schema assignment for groups…

    • 701 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Cis 111

    • 790 Words
    • 4 Pages

    (2012). Database systems: Design, implementation, and management. (10 ed.). United States of America: Joe Sabatino.…

    • 790 Words
    • 4 Pages
    Good Essays
  • Good Essays

    References: Pratt, P.J, & Adamski J.J, (2011). Concepts of Database Management. Ohio, OH: CENGAGE Learning.…

    • 688 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Discussion Board

    • 460 Words
    • 2 Pages

    I need to complete this assignment but I am having a hard time understanding it. Can someone give me some pointers on what to write on the DB? I just need a guide to start off with.…

    • 460 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    SQL: Queries

    • 6089 Words
    • 25 Pages

    SQL-QUERIES 1. Display all the information of the EMP table? A) select * from emp; 2. Display unique Jobs from EMP table? A) select distinct job from emp; B) select unique job from emp; 3. List the emps in the asc order of their Salaries? A) select * from emp order by sal asc; 4. List the details of the emps in asc order of the Dptnos and desc of Jobs? A)select * from emp order by deptno asc,job desc; 5. Display all the unique job groups in the descending order? A)select distinct job from emp order by job desc; 6. Display all the details of all ‘Mgrs’ A)Select * from emp where empno in ( select mgr from emp) ; 7. List the emps who joined before 1981. A) select * from emp where hiredate < (’01-jan-81’); 8. List the Empno, Ename, Sal, Daily sal of all emps in the asc order of Annsal. A) select empno ,ename ,sal,sal/30,12*sal annsal from emp order by annsal asc; 9. Display the Empno, Ename, job, Hiredate, Exp of all Mgrs A) select empno,ename ,job,hiredate, months_between(sysdate,hiredate) exp…

    • 6089 Words
    • 25 Pages
    Powerful Essays
  • Satisfactory Essays

    Sql - Queries

    • 333 Words
    • 2 Pages

    1. Retrieve the names of employees in department 5 who work more than 10 hours per week on the 'ProductX' project.…

    • 333 Words
    • 2 Pages
    Satisfactory Essays

Related Topics