# Multiple-Column Subqueries Schedule: Timing Topic

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 7 Multiple-Column Subqueries Schedule: Timing Topic 20 minutes Lecture 20 minutes Practice 40 minutes Total

2 Objectives After completing this lesson, you should be able to do the following: Write a multiple-column subquery Describe and explain the behavior of subqueries when null values are retrieved Write a subquery in a FROM clause 7-2 Lesson Aim In this lesson, you will learn how to write multiple-column subqueries and subqueries in the FROM clause of a SELECT statement.

3 Multiple-Column Subqueries Main query MANAGER 10 Subquery SALESMAN 30 MANAGER 10 CLERK 20 Main query compares MANAGER to Values from a multiple-row and multiple-column subquery SALESMAN 30 MANAGER 10 CLERK 20 Multiple-Column Subqueries So far you have written single-row subqueries and multiple-row subqueries where only one column was compared in the WHERE clause or HAVING clause of the SELECT statement. If you want to compare two or more columns, you must write a compound WHERE clause using logical operators. Multiple-column subqueries enable you to combine duplicate WHERE conditions into a single WHERE clause. Syntax SELECT column, column,... FROM table WHERE (column, column,...) IN (SELECT column, column,... FROM table WHERE condition);

4 Using Multiple-Column Subqueries Display the order id, product id, and quantity of items in the item table that match both the product id and quantity of an item in order 605. SQL> SELECT ordid, prodid, qty 2 FROM item 3 WHERE (prodid, qty) IN 4 (SELECT prodid, qty 5 FROM item 6 WHERE ordid = 605) 7 AND ordid <> 605; 7-4 Using Multiple-Column Subqueries The example on the slide is that of a multiple-column subquery because the subquery returns more than one column. It compares the values in the PRODID column and the QTY column of each candidate row in the ITEM table to the values in the PRODID column and QTY column for items in order 605. First, execute the subquery to see the PRODID and QTY values for each item in order 605. SQL> SELECT prodid, qty 2 FROM item 3 WHERE ordid = 605; PRODID QTY rows selected.

5 Using Multiple-Column Subqueries Display the order number, product number, and quantity of any item in which the product number and quantity match both the product number and quantity of an item in order 605. SQL> SELECT ordid, prodid, qty 2 FROM item 3 WHERE (prodid, qty) IN 4 (SELECT prodid, qty 5 FROM item 6 WHERE ordid = 605) 7 AND ordid <> 605; 7-5 Using Multiple-Column Subqueries (continued) When the SQL statement on the slide is executed, the Oracle server compares the values in both the PRODID and QTY columns and returns those orders where the product number and quantity for that product match both the product number and quantity for an item in order 605. The output of the SQL statement is: ORDID PRODID QTY The output shows that there are three items in other orders that contain the same product number and quantity as an item in order 605. For example, order 617 has ordered a quantity 500 of product Order 605 has also ordered a quantity 500 of product Therefore, these candidate rows are part of the output.

6 Column Comparisons Pairwise PRODID QTY Nonpairwise PRODID QTY Pairwise Versus Nonpairwise Comparisons Column comparisons in a multiple-column subquery can be pairwise comparisons or nonpairwise comparisons. The slide shows the product numbers and quantities of the items in order 605. In the example on the previous slide, a pairwise comparison was executed in the WHERE clause. Each candidate row in the SELECT statement must have both the same product number and same quantity as an item in order 605. This is illustrated on the left side of the slide above. The arrows indicate that both the product number and quantity in a candidate row match a product number and quantity of an item in order 605. A multiple-column subquery can also be a nonpairwise comparison. If you want a nonpairwise comparison (a cross product), you must use a WHERE clause with multiple conditions. A candidate row must match the multiple conditions in the WHERE clause but the values are compared individually. A candidate row must match some product number in order 605 as well as some quantity in order 605, but these values do not need to be in the same row. This is illustrated on the right side of the slide. For example, product appears in other orders, one order matching the quantity in order 605 (10), and another order having a quantity of 500. The arrows show a sampling of the various quantities ordered for a particular product.

7 Nonpairwise Comparison Subquery Display the order number, product number, and quantity of any item in which the product number and quantity match any product number and any quantity of an item in order 605. SQL> SELECT ordid, prodid, qty 2 FROM item 3 WHERE prodid IN (SELECT prodid 4 FROM item 5 WHERE ordid = 605) 6 AND qty IN (SELECT qty 7 FROM item 8 WHERE ordid = 605) 9 AND ordid <> 605; 7-7 Nonpairwise Comparison Subquery The slide example does a nonpairwise comparison of the columns. It displays the order number, product number, and quantity of any item in which the product number and quantity match any product number and quantity of an item in order 605. Order 605 is not included in the output.

8 Nonpairwise Subquery ORDID PRODID QTY rows selected. 7-8 Nonpairwise Subquery The results of the nonpairwise subquery are shown in the slide. Sixteen candidate rows in the ITEM table match the multiple conditions in the WHERE clause. For example, an item from order 621 is returned from the SQL statement. A product in order 621 (product number ) matches a product in an item in order 605. The quantity for product in order 621 (10) matches the quantity in another item in order 605 (the quantity for product ).

9 Null Values in a Subquery SQL> SELECT employee.ename 2 FROM emp employee 3 WHERE employee.empno NOT IN 4 (SELECT manager.mgr 5 FROM emp manager); no rows selected. 7-9 Returning Nulls in the Resulting Set of a Subquery The SQL statement on the slide attempts to display all the employees who do not have any subordinates. Logically, this SQL statement should have returned eight rows. However, the SQL statement does not return any rows. One of the values returned by the inner query is a null value and hence the entire query returns no rows. The reason is that all conditions that compare a null value result in a null. So whenever null values are likely to be part of the resultant set of a subquery, do not use the NOT IN operator. The NOT IN operator is equivalent to!=all. Notice that the null value as part of the resultant set of a subquery will not be a problem if you are using the IN operator. The IN operator is equivalent to =ANY. For example, to display the employees who have subordinates, use the following SQL statement: SQL> SELECT employee.ename 2 FROM emp employee 3 WHERE employee.empno IN (SELECT manager.mgr 4 FROM emp manager); ENAME KING... 6 rows selected.

10 Using a Subquery in the FROM Clause SQL> SELECT a.ename, a.sal, a.deptno, b.salavg 2 FROM emp a, (SELECT deptno, avg(sal) salavg 3 FROM emp 4 GROUP BY deptno) b 5 WHERE a.deptno = b.deptno 6 AND a.sal > b.salavg; ENAME SAL DEPTNO SALAVG KING JONES SCOTT rows selected Using a Subquery in the FROM Clause You can use a subquery in the FROM clause of a SELECT statement, which is very similar to how views are used. A subquery in the FROM clause of a SELECT statement defines a data source for that particular SELECT statement, and only that SELECT statement. The slide example displays employee names, salaries, department numbers, and average salaries for all the employees who make more than the average salary in their department.

11 Summary A multiple-column subquery returns more than one column. Column comparisons in multiplecolumn comparisons can be pairwise or nonpairwise. A multiple-column subquery can also be used in the FROM clause of a SELECT statement Summary Multiple-column subqueries enable you to combine duplicate WHERE conditions into a single WHERE clause. Column comparisons in a multiple-column subquery can be pairwise comparisons or nonpairwise comparisons. You can use a subquery to define a table to be operated on by a containing query. You do this by placing the subquery in the FROM clause of the containing query as you would a table name.

12 Practice Overview Creating multiple-column subqueries 7-12 Practice Overview In this practice, you will write multiple-value subqueries.

Using Subqueries to Solve Queries Objectives After completing this lesson, you should be able to do the following: Define subqueries Describe the types of problems that subqueries can solve List the types

### Aggregating Data Using Group Functions

Aggregating Data Using Group Functions Objectives Capter 5 After completing this lesson, you should be able to do the following: Identify the available group functions Describe the use of group functions

### Oracle SQL. Course Summary. Duration. Objectives

Oracle SQL Course Summary Identify the major structural components of the Oracle Database 11g Create reports of aggregated data Write SELECT statements that include queries Retrieve row and column data

### Subqueries Chapter 6

Subqueries Chapter 6 Objectives After completing this lesson, you should be able to do the follovving: Describe the types of problems that subqueries can solve Define subqueries List the types of subqueries

### Chapter 9 Joining Data from Multiple Tables. Oracle 10g: SQL

Chapter 9 Joining Data from Multiple Tables Oracle 10g: SQL Objectives Identify a Cartesian join Create an equality join using the WHERE clause Create an equality join using the JOIN keyword Create a non-equality

### Oracle Database 11g SQL

AO3 - Version: 2 19 June 2016 Oracle Database 11g SQL Oracle Database 11g SQL AO3 - Version: 2 3 days Course Description: This course provides the essential SQL skills that allow developers to write queries

### RDBMS Using Oracle. Lecture Week 7 Introduction to Oracle 9i SQL Last Lecture. kamran.munir@gmail.com. Joining Tables

RDBMS Using Oracle Lecture Week 7 Introduction to Oracle 9i SQL Last Lecture Joining Tables Multiple Table Queries Simple Joins Complex Joins Cartesian Joins Outer Joins Multi table Joins Other Multiple

### Oracle Database: Introduction to SQL

Oracle University Contact Us: 1.800.529.0165 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn View a newer version of this course It's important for developers to understand the

### Oracle Database: Introduction to SQL

Oracle University Contact Us: 1.800.529.0165 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training teaches you how to write subqueries,

### Oracle Database: Introduction to SQL

Oracle University Contact Us: +381 11 2016811 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn Understanding the basic concepts of relational databases ensure refined code by developers.

### Oracle Database: Introduction to SQL

Oracle University Contact Us: 1.800.529.0165 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn View a newer version of this course This Oracle Database: Introduction to SQL training

### Database Design and Programming with SQL: Part 2 Learning Objectives

Database Design and Programming with SQL: Part 2 Learning Objectives This is the second portion of the Database Design and Programming with SQL course. In this portion, students implement their database

### ICAB4136B Use structured query language to create database structures and manipulate data

ICAB4136B Use structured query language to create database structures and manipulate data Release: 1 ICAB4136B Use structured query language to create database structures and manipulate data Modification

### Oracle Database: SQL and PL/SQL Fundamentals

Oracle University Contact Us: +966 12 739 894 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training is designed to

### Oracle Database: SQL and PL/SQL Fundamentals

Oracle University Contact Us: 1.800.529.0165 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This course is designed to deliver the fundamentals of SQL and PL/SQL along

### Producing Readable Output with SQL*Plus

Producing Readable Output with SQL*Plus Chapter 8 Objectives After completing this lesson, you should be able to do the following: Produce queries that require an input variable Customize the SQL*Plus

### Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle University Contact Us: + 38516306373 Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the

### SQL Introduction Chapter 7, sections 1 & 4. Introduction to SQL. Introduction to SQL. Introduction to SQL

SQL Introduction Chapter 7, sections 1 & 4 Objectives To understand Oracle s SQL client interface Understand the difference between commands to the interface and SQL language. To understand the Oracle

### Oracle Database 12c: Introduction to SQL Ed 1.1

Oracle University Contact Us: 1.800.529.0165 Oracle Database 12c: Introduction to SQL Ed 1.1 Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,

### Data Models and Database Management Systems (DBMSs) Dr. Philip Cannata

Data Models and Database Management Systems (DBMSs) Dr. Philip Cannata 1 Data Models in the 1960s, 1970s, and 1980s Hierarchical Network (Graph) Relational Schema (Model) - first 1956 Vern Watts was IMS's

### Displaying Data from Multiple Tables. Chapter 4

Displaying Data from Multiple Tables Chapter 4 1 Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data from more than one table using equality

### Chapter 1. Writing Basic. SQL Statements

Chapter 1 Writing Basic SQL Statements 1 Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement

### Lab # 5. Retreiving Data from Multiple Tables. Eng. Alaa O Shama

The Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Database Lab Lab # 5 Retreiving Data from Multiple Tables Eng. Alaa O Shama November, 2015 Objectives:

### Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff

D80198GC10 Oracle Database 12c SQL and Fundamentals Summary Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff Level Professional Delivery Method Instructor-led

### Displaying Data from Multiple Tables

Displaying Data from Multiple Tables 1 Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data from more than one table using eguality and

### Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an

### Oracle Database 10g: Introduction to SQL

Oracle University Contact Us: 1.800.529.0165 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database technology.

Displaying Data from Multiple Tables Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data from more than one table using equijoins and

### SQL SELECT Query: Intermediate

SQL SELECT Query: Intermediate IT 4153 Advanced Database J.G. Zheng Spring 2012 Overview SQL Select Expression Alias revisit Aggregate functions - complete Table join - complete Sub-query in where Limiting

### Database Programming with PL/SQL: Learning Objectives

Database Programming with PL/SQL: Learning Objectives This course covers PL/SQL, a procedural language extension to SQL. Through an innovative project-based approach, students learn procedural logic constructs

### Oracle For Beginners Page : 1

Oracle For Beginners Page : 1 Chapter 24 NATIVE DYNAMIC SQL What is dynamic SQL? Why do we need dynamic SQL? An Example of Dynamic SQL Execute Immediate Statement Using Placeholders Execute a Query Dynamically

### Programming with SQL

Unit 43: Programming with SQL Learning Outcomes A candidate following a programme of learning leading to this unit will be able to: Create queries to retrieve information from relational databases using

### MOC 20461C: Querying Microsoft SQL Server. Course Overview

MOC 20461C: Querying Microsoft SQL Server Course Overview This course provides students with the knowledge and skills to query Microsoft SQL Server. Students will learn about T-SQL querying, SQL Server

### Introduction to Querying & Reporting with SQL Server

1800 ULEARN (853 276) www.ddls.com.au Introduction to Querying & Reporting with SQL Server Length 5 days Price \$4169.00 (inc GST) Overview This five-day instructor led course provides students with the

### Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25)

Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements inserts a row into the table? A. INSERT INTO employees

### Using SQL Queries to Insert, Update, Delete, and View Data: Joining Multiple Tables. Lesson C Objectives. Joining Multiple Tables

Using SQL Queries to Insert, Update, Delete, and View Data: Joining Multiple Tables Wednesay 9/24/2014 Abdou Illia MIS 4200 - Fall 2014 Lesson C Objectives After completing this lesson, you should be able

### Displaying Data from Multiple Tables

4 Displaying Data from Multiple Tables Copyright Oracle Corporation, 2001. All rights reserved. Schedule: Timing Topic 55 minutes Lecture 55 minutes Practice 110 minutes Total Objectives After completing

### Using Multiple Operations. Implementing Table Operations Using Structured Query Language (SQL)

Copyright 2000-2001, University of Washington Using Multiple Operations Implementing Table Operations Using Structured Query Language (SQL) The implementation of table operations in relational database

Handling Exceptions Copyright 2006, Oracle. All rights reserved. Oracle Database 10g: PL/SQL Fundamentals 8-1 Objectives After completing this lesson, you should be able to do the following: Define PL/SQL

### Where? Originating Table Employees Departments

JOINS: To determine an employee s department name, you compare the value in the DEPARTMENT_ID column in the EMPLOYEES table with the DEPARTMENT_ID values in the DEPARTMENTS table. The relationship between

### Triggers & Packages. {INSERT [OR] UPDATE [OR] DELETE}: This specifies the DML operation.

Triggers & Packages An SQL trigger is a mechanism that automatically executes a specified PL/SQL block (referred to as the triggered action) when a triggering event occurs on the table. The triggering

### Database Design and Database Programming with SQL - 5 Day In Class Event Day 1 Activity Start Time Length

Database Design and Database Programming with SQL - 5 Day In Class Event Day 1 Welcome & Introductions 9:00 AM 20 Lecture 9:20 AM 40 Practice 10:00 AM 20 Lecture 10:20 AM 40 Practice 11:15 AM 30 Lecture

### Course 20461C: Querying Microsoft SQL Server Duration: 35 hours

Course 20461C: Querying Microsoft SQL Server Duration: 35 hours About this Course This course is the foundation for all SQL Server-related disciplines; namely, Database Administration, Database Development

### Module 1: Getting Started with Databases and Transact-SQL in SQL Server 2008

Course 2778A: Writing Queries Using Microsoft SQL Server 2008 Transact-SQL About this Course This 3-day instructor led course provides students with the technical skills required to write basic Transact-

### Querying Microsoft SQL Server 2012

Querying Microsoft SQL Server 2012 Duration: 5 Days Course Code: M10774 Overview: Deze cursus wordt vanaf 1 juli vervangen door cursus M20461 Querying Microsoft SQL Server. This course will be replaced

Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement

### Introducing Microsoft SQL Server 2012 Getting Started with SQL Server Management Studio

Querying Microsoft SQL Server 2012 Microsoft Course 10774 This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for Microsoft SQL Server

### SQL Server. 2012 for developers. murach's TRAINING & REFERENCE. Bryan Syverson. Mike Murach & Associates, Inc. Joel Murach

TRAINING & REFERENCE murach's SQL Server 2012 for developers Bryan Syverson Joel Murach Mike Murach & Associates, Inc. 4340 N. Knoll Ave. Fresno, CA 93722 www.murach.com murachbooks@murach.com Expanded

### Querying Microsoft SQL Server

Course 20461C: Querying Microsoft SQL Server Module 1: Introduction to Microsoft SQL Server 2014 This module introduces the SQL Server platform and major tools. It discusses editions, versions, tools used

### 5. CHANGING STRUCTURE AND DATA

Oracle For Beginners Page : 1 5. CHANGING STRUCTURE AND DATA Altering the structure of a table Dropping a table Manipulating data Transaction Locking Read Consistency Summary Exercises Altering the structure

### MySQL for Beginners Ed 3

Oracle University Contact Us: 1.800.529.0165 MySQL for Beginners Ed 3 Duration: 4 Days What you will learn The MySQL for Beginners course helps you learn about the world's most popular open source database.

### Oracle Database 10g Express

Oracle Database 10g Express This tutorial prepares the Oracle Database 10g Express Edition Developer to perform common development and administrative tasks of Oracle Database 10g Express Edition. Objectives

### SUBQUERIES TO SOLVE QUERIES QUESTIONS

SUBQUERIES TO SOLVE QUERIES QUESTIONS http://www.tutorialspoint.com/sql_certificate/subqueries_to_solve_queries_questions.htm Copyright tutorialspoint.com 1. Which of the following are the types of sub-queries?

### D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

D61830GC30 for Developers Summary Duration Vendor Audience 5 Days Oracle Database Administrators, Developers, Web Administrators Level Technology Professional Oracle 5.6 Delivery Method Instructor-led

### Oracle 12c New Features For Developers

Oracle 12c New Features For Developers Presented by: John Jay King Download this paper from: 1 Session Objectives Learn new Oracle 12c features that are geared to developers Know how existing database

### 50439B: Basics of Transact SQL with SQL Server 2008 R2

50439B: Basics of Transact SQL with SQL Server 2008 R2 Duration: 3 days Class Description This instructor-led course provides students with the necessary knowledge to work with the data in SQL Server 2008R2.

### David L. Fuston, dfuston@vlamis.com Vlamis Software Solutions, Inc., www.vlamis.com

Data Warehouse and E-Business Intelligence ORACLE S SQL ANALYTIC FUNCTIONS IN 8i AND 9i David L. Fuston, dfuston@vlamis.com, www.vlamis.com INTRODUCTION The SQL language has traditionally provided little

### Querying Microsoft SQL Server 2012

Course 10774A: Querying Microsoft SQL Server 2012 Length: 5 Days Language(s): English Audience(s): IT Professionals Level: 200 Technology: Microsoft SQL Server 2012 Type: Course Delivery Method: Instructor-led

### 1 Structured Query Language: Again. 2 Joining Tables

1 Structured Query Language: Again So far we ve only seen the basic features of SQL. More often than not, you can get away with just using the basic SELECT, INSERT, UPDATE, or DELETE statements. Sometimes

### Course ID#: 1401-801-14-W 35 Hrs. Course Content

Course Content Course Description: This 5-day instructor led course provides students with the technical skills required to write basic Transact- SQL queries for Microsoft SQL Server 2014. This course

Join Example S04.5 Join Example Cart Prod S04.6 Previous joins are equijoins (=) Other operators can be used e.g. List all my employees older than their manager SELECT emp.name FROM employee emp, manager

### Course 10774A: Querying Microsoft SQL Server 2012

Course 10774A: Querying Microsoft SQL Server 2012 About this Course This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for Microsoft

### Course 10774A: Querying Microsoft SQL Server 2012 Length: 5 Days Published: May 25, 2012 Language(s): English Audience(s): IT Professionals

Course 10774A: Querying Microsoft SQL Server 2012 Length: 5 Days Published: May 25, 2012 Language(s): English Audience(s): IT Professionals Overview About this Course Level: 200 Technology: Microsoft SQL

### Controlling User Access

13 Controlling User Access Copyright Oracle Corporation, 2001. All rights reserved. Schedule: Timing Topic 20 minutes Lecture 20 minutes Practice 40 minutes Total Objectives After completing this lesson,

### Querying Microsoft SQL Server 20461C; 5 days

Lincoln Land Community College Capital City Training Center 130 West Mason Springfield, IL 62702 217-782-7436 www.llcc.edu/cctc Querying Microsoft SQL Server 20461C; 5 days Course Description This 5-day

### Unit 10: Microsoft Access Queries

Microsoft Access Queries Unit 10: Microsoft Access Queries Introduction Queries are a fundamental means of accessing and displaying data from tables. Queries used to view, update, and analyze data in different

### Writing Control Structures

Writing Control Structures Copyright 2006, Oracle. All rights reserved. Oracle Database 10g: PL/SQL Fundamentals 5-1 Objectives After completing this lesson, you should be able to do the following: Identify

### Oracle 1z0-007. Introduction to Oracle9i: SQL. Version 11.0

Oracle 1z0-007 Introduction to Oracle9i: SQL Version 11.0 Important Note, Please Read Carefully Study Tips This product will provide you questions and answers along with detailed explanations carefully

### Conversion Functions

Conversion Functions Conversion functions convert a value from one datatype to another. Generally, the form of the function names follows the convention datatype TO datatype. The first datatype is the

### Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-97 Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

### Oracle Database: Develop PL/SQL Program Units

Oracle University Contact Us: 1.800.529.0165 Oracle Database: Develop PL/SQL Program Units Duration: 3 Days What you will learn This Oracle Database: Develop PL/SQL Program Units course is designed for

### Objectives. Oracle SQL and SQL*PLus. Database Objects. What is a Sequence?

Oracle SQL and SQL*PLus Lesson 12: Other Database Objects Objectives After completing this lesson, you should be able to do the following: Describe some database objects and their uses Create, maintain,

### RETAIN THIS DOCUMENT FOR FUTURE EDUCATIONAL\EMPLOYMENT USE

COURSE OUTLINE 1 COMP1215 Total Hours 100 Credits 7 Prerequisite(s) Corequisite(s) Course Description This course teaches students how to create and design, fully functional relational databases using

### MOC 20461 QUERYING MICROSOFT SQL SERVER

ONE STEP AHEAD. MOC 20461 QUERYING MICROSOFT SQL SERVER Length: 5 days Level: 300 Technology: Microsoft SQL Server Delivery Method: Instructor-led (classroom) COURSE OUTLINE Module 1: Introduction to Microsoft

### Writing Queries Using Microsoft SQL Server 2008 Transact-SQL

Course 2778A: Writing Queries Using Microsoft SQL Server 2008 Transact-SQL Length: 3 Days Language(s): English Audience(s): IT Professionals Level: 200 Technology: Microsoft SQL Server 2008 Type: Course

### A basic create statement for a simple student table would look like the following.

Creating Tables A basic create statement for a simple student table would look like the following. create table Student (SID varchar(10), FirstName varchar(30), LastName varchar(30), EmailAddress varchar(30));

Displaying Data from Multiple Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data

### Handling Exceptions. Schedule: Timing Topic. 45 minutes Lecture 20 minutes Practice 65 minutes Total

23 Handling Exceptions Copyright Oracle Corporation, 1999. All rights reserved. Schedule: Timing Topic 45 minutes Lecture 20 minutes Practice 65 minutes Total Objectives After completing this lesson, you

### Unit 3. Retrieving Data from Multiple Tables

Unit 3. Retrieving Data from Multiple Tables What This Unit Is About How to retrieve columns from more than one table or view. What You Should Be Able to Do Retrieve data from more than one table or view.

### Querying Microsoft SQL Server 2012. Querying Microsoft SQL Server 2014 20461D. Course 10774A: Course Det ails. Co urse Outline

Course 10774A: Querying Microsoft SQL Server 2012 20461D Querying Microsoft SQL Server 2014 Course Det ails Co urse Outline M o d ule 1: Intr o d uctio n to M icro so ft SQL Ser ver 2012 This module introduces

### Introduction to Microsoft Jet SQL

Introduction to Microsoft Jet SQL Microsoft Jet SQL is a relational database language based on the SQL 1989 standard of the American Standards Institute (ANSI). Microsoft Jet SQL contains two kinds of

### Oracle 10g PL/SQL Training

Oracle 10g PL/SQL Training Course Number: ORCL PS01 Length: 3 Day(s) Certification Exam This course will help you prepare for the following exams: 1Z0 042 1Z0 043 Course Overview PL/SQL is Oracle's Procedural

### Relational Algebra. Query Languages Review. Operators. Select (σ), Project (π), Union ( ), Difference (-), Join: Natural (*) and Theta ( )

Query Languages Review Relational Algebra SQL Set operators Union Intersection Difference Cartesian product Relational Algebra Operators Relational operators Selection Projection Join Division Douglas

### Appendix A Practices and Solutions

Appendix A Practices and Solutions Table of Contents Practices for Lesson I... 3 Practice I-1: Introduction... 4 Practice Solutions I-1: Introduction... 5 Practices for Lesson 1... 11 Practice 1-1: Retrieving

### Advanced Query for Query Developers

for Developers This is a training guide to step you through the advanced functions of in NUFinancials. is an ad-hoc reporting tool that allows you to retrieve data that is stored in the NUFinancials application.

### 2. DECODE Function, CASE Expression

DECODE Function, CASE Expression 2.1 2. DECODE Function, CASE Expression Introduction to DECODE DECODE Examples Contrast with 9i Case Statement CASE Examples CASE Histograms SKILLBUILDERS DECODE Function,

### D B M G Data Base and Data Mining Group of Politecnico di Torino

Politecnico di Torino Database Management System Oracle Hints Data Base and Data Mining Group of Politecnico di Torino Tania Cerquitelli Computer Engineering, 2014-2015, slides by Tania Cerquitelli and

### Chapter 1 Overview of the SQL Procedure

Chapter 1 Overview of the SQL Procedure 1.1 Features of PROC SQL...1-3 1.2 Selecting Columns and Rows...1-6 1.3 Presenting and Summarizing Data...1-17 1.4 Joining Tables...1-27 1-2 Chapter 1 Overview of

### Maximizing Materialized Views

Maximizing Materialized Views John Jay King King Training Resources john@kingtraining.com Download this paper and code examples from: http://www.kingtraining.com 1 Session Objectives Learn how to create

### TIM 50 - Business Information Systems

TIM 50 - Business Information Systems Lecture 15 UC Santa Cruz March 1, 2015 The Database Approach to Data Management Database: Collection of related files containing records on people, places, or things.

### Oracle SQL 10g. Oracle Technologies SQL 10G Practice. Objectives

Oracle SQL 10g Oracle Technologies SQL 10G Practice Objectives Structured Query Language Basic Orders Functions in SQL Retrieving Data from Several Tables Advanced Retrieval Manipulating Data Creating

### Writing Queries Using Microsoft SQL Server 2008 Transact-SQL

Lincoln Land Community College Capital City Training Center 130 West Mason Springfield, IL 62702 217-782-7436 www.llcc.edu/cctc Writing Queries Using Microsoft SQL Server 2008 Transact-SQL Course 2778-08;

### VARRAY AND NESTED TABLE

Oracle For Beginners Page : 1 Chapter 23 VARRAY AND NESTED TABLE What is a collection? What is a VARRAY? Using VARRAY Nested Table Using DML commands with Nested Table Collection methods What is a collection?

### Course -Oracle 10g SQL (Exam Code IZ0-047) Session number Module Topics 1 Retrieving Data Using the SQL SELECT Statement

Course -Oracle 10g SQL (Exam Code IZ0-047) Session number Module Topics 1 Retrieving Data Using the SQL SELECT Statement List the capabilities of SQL SELECT statements Execute a basic SELECT statement

### Querying Microsoft SQL Server 2012

Querying Microsoft SQL Server 2012 MOC 10774 About this Course This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for Microsoft SQL

### Querying Microsoft SQL Server Course M20461 5 Day(s) 30:00 Hours

Área de formação Plataforma e Tecnologias de Informação Querying Microsoft SQL Introduction This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL

### Database CIS 340. lab#6. I.Arwa Najdi a_najdi1988@yahoo.com

Database CIS 340 lab#6 I.Arwa Najdi a_najdi1988@yahoo.com Outlines Obtaining Data from Multiple Tables (Join) Equijoins= inner join natural join Creating Joins with the USING Clause Creating Joins with