LECTURE10: DATA MANIPULATION IN SQL, ADVANCED SQL QUERIES
|
|
- Melinda Park
- 6 years ago
- Views:
Transcription
1 LECTURE10: DATA MANIPULATION IN SQL, ADVANCED SQL QUERIES Ref. Chapter5 From Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. 1 IS220: D a t a b a s e F u n d a m e n t a l s
2 The Process of Database Design 2 Conceptual Design (ERD) Logical Design (Relational Model) Physical Design Create schema (DDL) Load Data (DML)
3 Sample Data in Customer Table 3 custno custname custst custcity age 1 C1 Olaya St Jeddah 20 2 C2 Mains St Riyadh 30 3 C3 Mains Rd Riyadh 25 4 C4 Mains Rd Dammam 5 C5 Mains Rd Riyadh
4 Sample Data in Product Table 4 prodno prodname proddes price 100 P0 Food P1 healthy food P P3 self_raising flour,80%wheat P4 network 80x 300
5 Sample Data in Orders Table 5 ordno orddate custno prodno quantity 1 01-jan jan jan jan jan mar
6 EMPLOYEE Employee No. First Name Last Name Dept Number Salary E1 Mandy Smith D E2 Daniel Hodges D E3 Shaskia Ramanthan D E4 Graham Burke D E5 Annie Nguyen D DEPARTMENT Dept Number Dept Name Location Mail Number D1 Computer Science Bundoora 39 D2 Information Science Bendigo 30 D3 Physics Bundoora 37 D4 Chemistry Bendigo 35 6
7 Sample Data in Customer Table O_Id OrderDate OrderPrice Customer /11/ Nora /10/ Sara /09/ Nora /09/ Nora /08/ Yara /10/ Sara 7
8 Table names and Column names 8 Table name can be prefixed with the owner name. eg, if table product is owned by user John, you can use SELECT * FROM John.product; Column names can be prefixed with table name, SELECT product.prodno FROM product;
9 Alias 9 SQL aliases are used to temporarily rename a table or a column heading. Syntax for Columns SELECT column_name AS alias_name FROM table_name; SELECT column_name(s) Syntax for Tables FROM table_name [AS] alias_name;
10 Alias ( important note ) 10 Columns Alias: For example, you might wish to know how much is the combined total salary of all employees whose salary is above $25,000 / year. SELECT SUM(salary) AS "Total Salary" FROM employees WHERE salary > 25000; In this example, we've aliased the sum(salary) field as "Total Salary". As a result, "Total Salary" will display as the field name when the result set is returned. Table Alias: SELECT o.orderid, o.orderdate FROM Orders AS o;
11 Exercise 11 create table count_null ( a number, b number ); Output : insert into count_null values ( 1, 5); insert into count_null values ( null, 7); insert into count_null values ( null, null); insert into count_null values ( 8, 2); select count(a) as "count_a_not_null", count(b) as "count_b_not_null", count(*) as "count_all from count_null;
12 12 JOIN
13 JOIN 13 Often two or more tables are needed at the same time to find all required data These tables must be "joined" together The formal JOIN basically, computes a new table from those to be joined the new table contains data in the matching rows of the individual tables.
14 Types of JOIN 14 types of JOIN:. INNER JOIN: Return rows when there is at least one match in both tables LEFT JOIN: Return all rows from the left table, even if there are no matches in the right table RIGHT JOIN: Return all rows from the right table, even if there are no matches in the left table Full Outer Joins : retains rows that are unmatched in both the tables. NOTE: In all the above outer joins, the displayed unmatched columns are filled with NULLS.
15 Types of JOIN 15
16 SQL Examples of Joins ( 1) 16 Simple Join SELECT E.firstName, E.lastName, D.deptName FROM EMPLOYEE E, DEPARTMENT D WHERE E.deptNumber = D.deptNumber; Employee No. First Name Last Name Dept Number Salary E1 Mandy Smith D E2 Daniel Hodges D E3 Shaskia Ramanthan D E4 Graham Burke D E5 Annie Nguyen D Dept Number Dept Name Location Mail Number D1 Computer Science Bundoora 39 D2 Information Science Bendigo 30 D3 Physics Bundoora 37 D4 Chemistry Bendigo 35
17 17 This is the result from the matching Employee N First Name Last Name Salary Dept Number Dept Number Dept Name Location ail Numbe E1 Mandy Smith D1 D1 Computer Science Bundoora 39 E2 Daniel Hodges D2 D2 Information Science Bendigo 30 E3 Shaskia Ramanthan D2 D2 Information Science Bundoora 37 E4 Graham Burke D1 D1 Computer Science Bundoora 39 E5 Annie Nguyen D1 D1 Computer Science Bundoora 39 This is the final result: FIRSTNAME LASTNAME DEPTNAME Mandy Smith Computer Science Annie Nguyen Computer Science Graham Burke Computer Science Shaskia Ramanthan Information Science Daniel Hodges Information Science
18 SQL Examples of Joins ( 2 ) Joining more than two tables SELECT E.firstName, E.lastName, P.projTitle FROM EMPLOYEE E, WORKS_ON W, PROJECT P WHERE E.employeeNo = W.employeeNo AND W.projNo = EMPLOYEE P.projNo; WORKS_ON Employee No. ProjNo E1 1 E4 1 E5 2 E2 3 E3 1 PROJECT ProjNo Project Title 1 Project A 2 Project B 3 Project C Employee No. First Name Last Name Dept Number Salary E1 Mandy Smith D E4 Graham Burke D E5 Annie Nguyen D E2 Daniel Hodges D E3 Shaskia Ramanthan D FIRSTNAME LASTNAME PROJTITLE Mandy Smith Project A Graham Burke Project A Annie Nguyen Project B Daniel Hodges Project C Shaskia Ramanthan Project A 18
19 SQL Examples of Joins ( 3 ) 19 List customers (by customer number, name and address) who have ordered the product 100. SELECT c.custno, custname, custst, custcity FROM customer c, orders o WHERE c.custno=o.custno AND prodno=100; CUSTNO CUSTNAME CUSTST CUSTCITY C1 Olaya St Jeddah 2 C2 Mains St Riyadh 3 C3 Mains Rd Riyadh custn o custn ame custst custcity age 1 C1 Olaya St Jeddah 20 2 C2 Mains St Riyadh 30 3 C3 Mains Rd Riyadh 25 4 C4 Mains Rd Dammam 5 C5 Mains Rd Riyadh ordno orddate custno prodno quantity 1 01-jan jan jan jan jan mar
20 SQL Examples of Joins ( 4 ) 20 Find the total price of the products ordered by customer 1. SELECT sum(price*quantity) FROM orders, product WHERE orders.prodno = product.prodno AND custno = 1; SUM(PRICE*QUANTITY) prod No prodn ame proddes price 100 P0 Food P1 healthy food P P3 self_raising flour,80%wheat P4 network 80x 300 ordno orddate custno prodn o 1 01-jan jan jan jan jan quant ity 6 06-mar
21 Outer Joins in Oracle SQL 21 Put an (+) on the potentially deficient side, ie the side where nulls may be added The (+) operator is placed in the join condition next to the table that is allowed to have NULL values. Example (Left Outer Join) : List all customers, and the products ordered if they have ordered some products. SELECT c.custno, o.prodno, quantity FROM customer c, orders o WHERE c.custno = o.custno (+); Note: a table may be outer joined with only one other table. Which table column to use is important, eg, in above example, do not use o.custno in place of c.custno in the SELECT list.
22 22
23 1) Inner Join SQL Example 23 SELECT Student_Name, Advisor_Name FROM Students, Advisors WHERE Students.Advisor_ID= Advisors.Advisor_ID;
24 2) Left Outer Join SQL Example 24 SELECT Student_Name, Advisor_Name FROM Students, Advisors WHERE Students.Advisor_ID= Advisors.Advisor_ID (+);
25 3) Right Outer Join SQL Example 25 SELECT Student_Name, Advisor_Name FROM Students, Advisors WHERE Students.Advisor_ID(+)= Student_Name Advisors.Advisor_ID Advisor_Name ; Student_1 advisor 1 Student_5 advisor 3 Student_7 advisor 3 Student_9 advisor 1 Student_10 advisor 3 null Advisor 5
26 4) Full Outer Join SQL Example 26 SELECT Student_Name, Advisor_Name FROM Students, Advisors WHERE Students.Advisor_ID (+) = Advisors.Advisor_ID (+) ;
27 27
28 Nested Queries (1) ordno orddate custno prodno quantity 1 01-jan jan jan jan jan mar Query results are tables, which can also be queried. SELECT * FROM (SELECT prodno, sum(quantity) AS sum FROM orders GROUP BY prodno) WHERE sum>10; Equivalent to SELECT prodno, sum(quantity) as sum FROM orders GROUP BY prodno HAVING sum(quantity)>10; PRODNO SUM PRODNO SUM The inner query is referred to as a subquery
29 prodno prodname proddes price 29 Nested Queries (2) 100 P0 Food P1 healthy food P P3 self_raising flour,80%wheat P4 network 80x 300 If the query result is a single value, it can be treated as a value, and be compared with other values. Subquery with equality ( <, >) : Example: Find products with price more than average SELECT prodno, price FROM product WHERE price > (SELECT AVG(price) FROM product); PRODNO PRICE AVG(PRICE) 200
30 30 Subquery Subquery with equality (=) : Employee No. First Name Last Name Dept Number Salary E1 Mandy Smith D E2 Daniel Hodges D E3 Shaskia Ramanthan D E4 Graham Burke D E5 Annie Nguyen D Dept Number Dept Name Location Mail Number D1 Computer Science Bundoora 39 D2 Information Science Bendigo 30 D3 Physics Bundoora 37 D4 Chemistry Bendigo 35 Give a list with first and last names of employees who work in the department with mail number = 39 SELECT firstname, lastname FROM EMPLOYEE WHERE deptnumber =(SELECT deptnumber FIRSTNAME LASTNAME mandy smith graham burke Annie nguyen FROM DEPARTMENT WHERE mailnumber = 39); DEPTNUMBER D1
31 31 Subquery Employee No. First Name Last Name Dept Number Salary E1 Mandy Smith D E2 Daniel Hodges D E3 Shaskia Ramanthan D E4 Graham Burke D E5 Annie Nguyen D Dept Number Dept Name Location Mail Number D1 Computer Science Bundoora 39 D2 Information Science Bendigo 30 D3 Physics Bundoora 37 D4 Chemistry Bendigo 35 Subquery with aggregate function: Give a list with first, last names and salary of employees whose salary is greater than average salary for all employees. SELECT firstname, lastname, salary FROM EMPLOYEE WHERE salary > (SELECT avg(salary) FROM EMPLOYEE); AVG (SALARY) FIRSTNAME LASTNAME SALARY Shaskia Ramanthan Annie Nguyen 60000
32 32 Subquery Nested Subquery (use of IN): Give a list with first, last names of employees whose departments are located in Bundoora. SELECT firstname, lastname FROM EMPLOYEE WHERE deptnumber IN (SELECT deptnumber FIRSTNAME LASTNAME Annie nguyen graham burke mandy smith Employee No. First Name Last Name Dept Number Salary E1 Mandy Smith D E2 Daniel Hodges D E3 Shaskia Ramanthan D E4 Graham Burke D E5 Annie Nguyen D Dept Number Dept Name Location Mail Number D1 Computer Science Bundoora 39 D2 Information Science Bendigo 30 D3 Physics Bundoora 37 D4 Chemistry Bendigo 35 FROM DEPARTMENT WHERE location = Bundoora ); deptnumber D1 D3
33 Subquery 33 List the products ordered by customers living in Riyadh. SELECT prodno FROM orders WHERE custno IN (SELECT custno FROM customer WHERE custcity = Riyadh ); - This query is equivalent to custno SELECT prodno FROM orders o, customer c WHERE o.custno =c.custno AND custcity = Riyadh'; PRODNO
34 34
35 Queries using EXISTS or NOT EXISTS 35 Queries using EXISTS Designed for use only with subqueries EXISTS return true if there exists at least one row in the result table returned by the subquery, it is false if the subquery returns an empty result table. Syntax SELECT column_name FROM table_name WHERE EXISTS NOT EXISTS ( subquery );
36 Queries using EXISTS or NOT EXISTS 36 Example SELECT firstname, lastname FROM EMPLOYEE E WHERE EXISTS (SELECT * FROM DEPARTMENT D WHERE E.deptNumber = D.deptNumber AND D.location = Bendigo ); Employee No. First Name Last Name Dept Number Salary E1 Mandy Smith D E2 Daniel Hodges D E3 Shaskia Ramanthan D E4 Graham Burke D E5 Annie Nguyen D FIRSTNAME LASTNAME Shaskia Ramanthan Daniel Hodges Dept Number Dept Name Location Mail Number D1 Computer Science Bundoora 39 D2 Information Science Bendigo 30 D3 Physics Bundoora 37 D4 Chemistry Bendigo 35
37 Example. EXISTS custno custname custst custcity age 1 C1 Olaya St Jeddah 20 2 C2 Mains St Riyadh C3 Mains Rd Riyadh 25 4 C4 Mains Rd Dammam 5 C5 Mains Rd Riyadh Find all customers who have ordered some products. SELECT * FROM customer c WHERE exists (SELECT * FROM orders o WHERE o.custno =c.custno); ordno orddate custno prodno quanti ty 1 01-jan jan jan jan jan CUSTNO CUNAME CUSTST 6 06-mar CUSTCITY AGE C1 Olaya St Jeddah 20 2 C2 Mains St Riyadh 30 3 C3 Mains Rd Riyadh 25 If the subquery is not empty, then the exists condition is true.
38 38 Example. NOT EXISTS custno custname custst custcity ag e 1 C1 Olaya St Jeddah 20 2 C2 Mains St Riyadh 30 3 C3 Mains Rd Riyadh 25 4 C4 Mains Rd Dammam Find all customers such that no order made by them has a quantity less than 2. SELECT * FROM customer c WHERE NOT EXISTS (SELECT * FROM orders o WHERE o.custno = c.custno AND quantity <2); 5 C5 Mains Rd Riyadh ordno orddate custno prodno quanti ty 1 01-jan jan jan jan jan mar CUSTNO CUTNAME CUSTST CUSTCITY AGE C5 Mains Rd Riyadh 4 C4 Mains Rd Dammam 3 C3 Mains Rd Riyadh 25
39 39
40 UNION 40 The UNION operator is used to combine the result-set of two or more SELECT statements. Notice that each SELECT statement within the UNION must 1. have the same number of columns. 2. The columns must also have similar data types. 3. the columns in each SELECT statement must be in the same order. Combines the results of two SELECT statements into one result set, and then eliminates any duplicate rows from that result set. SQL UNION Syntax SELECT column_name(s) FROM table_name1 UNION SELECT column_name(s) FROM table_name2;
41 UNION 41 Note: The UNION operator selects only distinct values by default. To allow duplicate values, use UNION ALL. UNION ALL Combines the results of two SELECT statements into one result set. SQL UNION ALL Syntax SELECT column_name(s) FROM table_name1 UNION ALL SELECT column_name(s) FROM table_name2
42 UNION Example 1 42 "Employees_Norway" E_ID E_Name 01 Hansen, Ola 02 Svendson, Tove 03 Svendson, Stephen 04 Pettersen, Kari Employees_USA E_ID E_Name 01 Turner, Sally 02 Kent, Clark 03 Svendson, Stephen 04 Scott, Stephen list all the different employees in Norway and USA SELECT E_Name FROM Employees_Norway UNION SELECT E_Name FROM Employees_USA; E_Name Hansen, Ola Svendson, Tove Svendson, Stephen Pettersen, Kari Turner, Sally Kent, Clark Scott, Stephen
43 UNION Example 2 43 SELECT custno FROM customer WHERE custcity= Riyadh UNION SELECT custno FROM orders WHERE prodno=102; queries custno custname custst custcity age CUSTNO // union of the two ordno orddate custno prodno quantity 1 C1 Olaya St Jeddah 20 2 C2 Mains St Riyadh 30 3 C3 Mains Rd Riyadh 25 4 C4 Mains Rd Dammam 5 C5 Mains Rd Riyadh 1 01-jan jan jan jan jan mar
44 MINUS 44 the MINUS operator returns only unique rows returned by the first query but not by the second. Takes the result set of one SELECT statement, and removes those rows that are also returned by a second SELECT statement. SQL MINUS Syntax SELECT column_name(s) FROM table_name1 MINUS SELECT column_name(s) FROM table_name2 ;
45 45 MINUS Example 1 Example: List the products that had never been ordered by customers SELECT prodno FROM product MINUS SELECT prodno FROM orders; //difference from the two queries prodno prodname proddes price 100 P0 Food P1 healthy food P P3 self_raising flour,80%wheat P4 network 80x 300 PRODNO ordno orddate custno prodno quantity 1 01-jan jan jan jan jan mar
46 INTERSECT 46 The INTERSECT operator returns only those rows returned by both queries. Returns only those rows that are returned by each of two SELECT statements. SQL INTERSECT Syntax SELECT column_name(s) FROM table_name1 INTERSECT SELECT column_name(s) FROM table_name2 ;
47 INTERSECT 47 Example: List the customers from Riyadh city who ordered product 102 SELECT custno FROM customer WHERE custcity= Riyadh' INTERSECT SELECT custno FROM orders WHERE prodno=102; queries CUSTNO // intersect of the two custn o custname custst custcity age 1 C1 Olaya St Jeddah 20 2 C2 Mains St Riyadh 30 3 C3 Mains Rd Riyadh 25 4 C4 Mains Rd Dammam 5 C5 Mains Rd Riyadh ordno orddate custno prodno quantit y 1 01-jan jan jan jan jan mar
48 Examples 48 EMPLOYEE Employee No. First Name Last Name Dept Number Salary E1 Mandy Smith D E2 Daniel Hodges D E3 Shaskia Ramanthan D DEPENDENT Employee No. First Name Last Name Date of Birth E1 Joshua Smith 12-Jun-1998 E3 Jay Ramanthan 04-Jan-1996 E1 Jemima Smith 08-Sep-2000
49 Examples 49 SELECT employeeno, firstname, lastname FROM EMPLOYEE UNION SELECT employeeno, firstname, lastname FROM DEPENDENT; SELECT employeeno FROM EMPLOYEE INTERSECT SELECT employeeno FROM DEPENDENT
50 50
51 EMPLOYEE Table Example1 51 EMPLOYEE_ID LAST_NAME FIRST_NAME JOB_ID MANAGER_ID SALARY COMM DEPARTMENT_ID 7369 SMITH JOHN NULL ALLEN KEVIN DOYLE JEAN NULL DENNIS LYNN NULL BAKER LESLIE NULL WARK CYNTHIA SELECT department_id, count(*), max(salary), min(salary) FROM employee GROUP BY department_id; DEPARTMENT_ID COUNT(*) MAX(SALARY) MIN(SALARY)
52 EMPLOYEE Table Example2 52 EMPLOYEE_ID LAST_NAME FIRST_NAME JOB_ID MANAGER_ID SALARY COMM DEPARTMENT_ID 7369 SMITH JOHN NULL ALLEN KEVIN DOYLE JEAN NULL DENNIS LYNN NULL BAKER LESLIE NULL WARK CYNTHIA SELECT Employee_ID, FIRST_NAME,DEPARTMENT_ID FROM employee WHERE salary=(select max(salary) FROM employee); Employee_ID FIRST_NAME DEPARTMENT_ID JEAN 30
53 EMPLOYEE Table Example3 53 EMPLOYEE_ID LAST_NAME FIRST_NAME JOB_ID MANAGER_ID SALARY COMM DEPARTMENT_ID 7369 SMITH JOHN NULL ALLEN KEVIN DOYLE JEAN NULL DENNIS LYNN NULL BAKER LESLIE NULL WARK CYNTHIA SELECT Employee_ID FROM employee WHERE department_id IN (SELECT department_id FROM department WHERE name= SALES ); DEPARTMENT Department_ID Name Location_ID 10 ACCOUNTING RESEARCH SALES OPERATIONS 167 EMPLOYEE_ID
54 EMPLOYEE Table Example4 54 EMPLOYEE_ID LAST_NAME FIRST_NAME JOB_ID MANAGER_ID SALARY COMM DEPARTMENT_ID 7369 SMITH JOHN NULL ALLEN KEVIN DOYLE JEAN NULL DENNIS LYNN NULL BAKER LESLIE NULL WARK CYNTHIA DEPARTMENT Department_ID Name Location_ID 10 ACCOUNTING 122 SELECT name FROM department d WHERE NOT EXISTS (SELECT last_name FROM employee e WHERE d.department_id=e.department_id); 20 RESEARCH SALES OPERATIONS 167 NAME ACCOUNTING
55 55 EMPLOYEE Table Example4 LAST_NAME DEPARTMENT_ID Department_ID Name SMITH RESEARCH ALLEN SALES DOYLE SALES DENNIS SALES BAKER OPERATIONS WARK SALES ACCOUNTING Department Not exist
56 EMPLOYEE Table Example5 56EMPLOYEE_ID LAST_NAME FIRST_NAME JOB_ID MANAGER_ID SALARY COMM DEPARTMENT_ID 7369 SMITH JOHN NULL ALLEN KEVIN DOYLE JEAN NULL DENNIS LYNN NULL BAKER LESLIE NULL WARK CYNTHIA LAST_NAME DEPARTMENT_ID NAME BAKER 40 OPERATIONS 10 ACCOUNTING DEPARTMENT Department_ID Name Location_ID 10 ACCOUNTING RESEARCH SALES OPERATIONS 167 SELECT last_name, d.department_id, d.name FROM employee e, department d WHERE e.department_id (+)= d.department_id AND d.department_id in (SELECT department_id FROM department WHERE name IN ( ACCOUNTING, OPERATIONS ));
57 EMPLOYEE Table Example5 57 LAST_NAME LAST_NAME DEPARTMENT_ID DEPARTMENT_ID Department_ID Department_ID Name Name LAST_NAME SMITH SMITH Department_ID Name RESEARCH RESEARCH BAKER ALLEN ALLEN OPERATIONS SALES SALES DOYLE DOYLE ACCOUNTING SALES SALES DENNIS DENNIS SALES SALES BAKER BAKER OPERATIONS OPERATIONS WARK WARK SALES SALES LAST_NAME DEPARTMENT_ID NAMEACCOUNTING ACCOUNTING BAKER 40 OPERATIONS 10 ACCOUNTING SELECT last_name, d.department_id, d.name FROM employee e, department d WHERE e.department_id (+)= d.department_id AND d.department_id in (SELECT department_id FROM department WHERE name IN ( ACCOUNTING, OPERATIONS ));
58 EMPLOYEE Table Example6 58 EMPLOYEE_ID LAST_NAME FIRST_NAME JOB_ID MANAGER_ID SALARY COMM DEPARTMENT_ID 7369 SMITH JOHN NULL ALLEN KEVIN DOYLE JEAN NULL DENNIS LYNN NULL BAKER LESLIE NULL WARK CYNTHIA SELECT employee_id, First_name, Last_name, Salary FROM employee WHERE last_name like D% ; EMPL OYEE_ID FIRST_NAME LAST_NAME SALARY JEAN DOYLE LYNN DENNIS 2750
59 59
Lecture10: Data Manipulation in SQL, Advanced SQL queries
IS220 / IS422 : Database Fundamentals : Data Manipulation in SQL, Advanced SQL queries Ref. Chapter5 Prepared by L. Nouf Almujally & Aisha AlArfaj College of Computer and Information Sciences - Information
More informationStructured Query Language (SQL) lab syllabus 4 th science. SQL is used to communicate with a database. it is the standard language for relational
Structured Query Language (SQL) lab syllabus 4 th science Introduction : * what is sql? SQL is used to communicate with a database. it is the standard language for relational database management systems.
More informationRetrieving Data from Multiple Tables
Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 5 Retrieving Data from Multiple Tables Eng. Mohammed Alokshiya November 2, 2014 An JOIN clause
More informationLECTURE11: TRANSACTION CONTROL LANGUAGE DATA CONTROL LANGUAGE
LECTURE11: TRANSACTION CONTROL LANGUAGE DATA CONTROL LANGUAGE Ref. Chapter6 From Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. 1 IS220
More informationIntermediate SQL: Aggregated Data, Joins and Set Operators
Intermediate SQL: Aggregated Data, Joins and Set Operators Aggregated Data and Sorting Objectives After completing this lesson, you should be able to do the following: Identify the available group functions
More informationKORA. RDBMS Concepts II
RDBMS Concepts II Outline Querying Data Source With SQL Star & Snowflake Schemas Reporting Aggregated Data Using the Group Functions What Are Group Functions? Group functions operate on sets of rows to
More informationLecture11: Transaction Control Language Data Control Language
IS220 : Database Fundamentals Lecture11: Transaction Control Language Data Control Language College Compu a Informati Science Informati Syste De Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Transaction
More informationINDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables
INDEX Exercise No Title 1 Basic SQL Statements 2 Restricting and Sorting Data 3 Single Row Functions 4 Displaying data from multiple tables 5 Creating and Managing Tables 6 Including Constraints 7 Manipulating
More informationDatabase Management Systems,
Database Management Systems SQL Query Language (3) 1 Topics Aggregate Functions in Queries count sum max min avg Group by queries Set Operations in SQL Queries Views 2 Aggregate Functions Tables are collections
More informationJoin, Sub queries and set operators
Join, Sub queries and set operators Obtaining Data from Multiple Tables EMPLOYEES DEPARTMENTS Cartesian Products A Cartesian product is formed when: A join condition is omitted A join condition is invalid
More informationÇALIŞMA TEST SORULARI
1. A table has the following definition: EMPLOYEES( EMPLOYEE_ID NUMBER(6) NOT NULL, LAST_NAME VARCHAR2(10) NOT NULL, MANAGER_ID VARCHAR2(6)) and contains the following rows: (1001, 'Bob Bevan', '200')
More informationDisplaying Data from Multiple Tables. Copyright 2004, Oracle. All rights reserved.
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
More informationIntroduction to Oracle9i: SQL
Oracle 1z0-007 Introduction to Oracle9i: SQL Version: 22.0 QUESTION NO: 1 Oracle 1z0-007 Exam Examine the data in the EMPLOYEES and DEPARTMENTS tables. You want to retrieve all employees, whether or not
More informationDatabase Foundations. 6-9 Joining Tables Using JOIN. Copyright 2014, Oracle and/or its affiliates. All rights reserved.
Database Foundations 6-9 Roadmap Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML Transaction Control Language (TCL)
More information1Z0-007 ineroduction to oracle9l:sql
ineroduction to oracle9l:sql Q&A DEMO Version Copyright (c) 2007 Chinatag LLC. All rights reserved. Important Note Please Read Carefully For demonstration purpose only, this free version Chinatag study
More informationOracle Database SQL Basics
Oracle Database SQL Basics Kerepes Tamás, Webváltó Kft. tamas.kerepes@webvalto.hu 2015. február 26. Copyright 2004, Oracle. All rights reserved. SQL a history in brief The relational database stores data
More informationDatabase Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved.
Database Foundations 6-4 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control
More informationExam: 1Z Title : Introduction to Oracle9i: SQL. Ver :
Exam: 1Z0-007 Title : Introduction to Oracle9i: SQL Ver : 05.14.04 QUESTION 1 A: This query uses "+" to create outer join as it was in Oracle8i, but it requires also usage of WHERE clause in SELECT statement.b:
More informationRetrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.
Retrieving Data Using the SQL SELECT Statement Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL
More informationKing Fahd University of Petroleum and Minerals
1 King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 334: Database Systems Semester 041 Major Exam 1 18% ID: Name: Section: Grades Section Max Scored A 5 B 25
More informationWHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints
SQL KEREM GURBEY WHAT IS SQL Database query language, which can also: Define structure of data Modify data Specify security constraints DATA DEFINITION Data-definition language (DDL) provides commands
More informationCreating Other Schema Objects
Creating Other Schema Objects Objectives After completing this lesson, you should be able to do the following: Create simple and complex views Retrieve data from views Database Objects Object Table View
More informationGIFT Department of Computing Science. CS-217/224: Database Systems. Lab-5 Manual. Displaying Data from Multiple Tables - SQL Joins
GIFT Department of Computing Science CS-217/224: Database Systems Lab-5 Manual Displaying Data from Multiple Tables - SQL Joins V3.0 5/5/2016 Introduction to Lab-5 This lab introduces students to selecting
More informationRetrieving Data Using the SQL SELECT Statement. Copyright 2009, Oracle. All rights reserved.
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
More informationEXISTS NOT EXISTS WITH
Subquery II. Objectives After completing this lesson, you should be able to do the following: Write a multiple-column subquery Use scalar subqueries in SQL Solve problems with correlated subqueries Update
More informationCHAPTER 3: QUESTIONS AND ANSWERS
CHAPTER 3: QUESTIONS AND ANSWERS 1 Why do some people pronounce SQL as sequel? Because of its naming history, SQL is developed from SEQUEL language, so some people pronounce SQL as sequel. 2 Why are the
More informationLab # 6. Data Manipulation Language (DML)
Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 6 Data Manipulation Language (DML) Eng. Haneen El-Masry December, 2014 2 Objective To be more familiar
More informationVendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292
Vendor: Oracle Exam Code: 1Z1-051 Exam Name: Oracle Database: SQL Fundamentals I Q&As: 292 QUESTION 1 Evaluate the SQL statement: TRUNCATE TABLE DEPT; Which three are true about the SQL statement? (Choose
More informationA subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select,
Sub queries A subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select, Result of the inner query is passed to the main
More informationExam : 1Z Title : Introduction to Oracle9i: SQL
Exam : 1Z0-007 Title : Introduction to Oracle9i: SQL Ver : 01-15-2009 QUESTION 1: Examine the data in the EMPLOYEES and DEPARTMENTS tables. EMPLOYEES LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20
More informationSubquery: There are basically three types of subqueries are:
Subquery: It is also known as Nested query. Sub queries are queries nested inside other queries, marked off with parentheses, and sometimes referred to as "inner" queries within "outer" queries. Subquery
More informationOracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version :
Oracle 1Z1-051 Oracle Database 11g SQL Fundamentals I Download Full Version : https://killexams.com/pass4sure/exam-detail/1z1-051 QUESTION: 238 You need to perform these tasks: - Create and assign a MANAGER
More informationQuerying Data with Transact SQL
Course 20761A: Querying Data with Transact SQL Course details Course Outline Module 1: Introduction to Microsoft SQL Server 2016 This module introduces SQL Server, the versions of SQL Server, including
More informationInstitute of Aga. Network Database LECTURER NIYAZ M. SALIH
2017 Institute of Aga Network Database LECTURER NIYAZ M. SALIH Database: A Database is a collection of related data organized in a way that data can be easily accessed, managed and updated. Any piece of
More informationIntroduction to SQL Part 2 by Michael Hahsler Based on slides for CS145 Introduction to Databases (Stanford)
Introduction to SQL Part 2 by Michael Hahsler Based on slides for CS145 Introduction to Databases (Stanford) Lecture 3 Lecture Overview 1. Aggregation & GROUP BY 2. Set operators & nested queries 3. Advanced
More informationAlkérdések II. Copyright 2004, Oracle. All rights reserved.
Alkérdések II. Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Write a multiple-column subquery Use scalar subqueries in SQL
More informationWhat Are Group Functions? Reporting Aggregated Data Using the Group Functions. Objectives. Types of Group Functions
What Are Group Functions? Group functions operate on sets of rows to give one result per group. Reporting Aggregated Data Using the Group Functions Maximum salary in table Copyright 2004, Oracle. All rights
More informationData Manipulation Language (DML)
In the name of Allah Islamic University of Gaza Faculty of Engineering Computer Engineering Department ECOM 4113 DataBase Lab Lab # 3 Data Manipulation Language (DML) El-masry 2013 Objective To be familiar
More informationRetrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.
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
More informationLecture7: SQL Overview, Oracle Data Type, DDL and Constraints Part #2
IS220 : Database Fundamentals College of Computer and Information Sciences - Information Systems Dept. Lecture7: SQL Overview, Oracle Data Type, DDL and Constraints Part #2 Ref. Chapter6 Prepared by L.
More informationInstitute of Aga. Microsoft SQL Server LECTURER NIYAZ M. SALIH
Institute of Aga 2018 Microsoft SQL Server LECTURER NIYAZ M. SALIH Database: A Database is a collection of related data organized in a way that data can be easily accessed, managed and updated. Any piece
More informationRETRIEVING DATA USING THE SQL SELECT STATEMENT
RETRIEVING DATA USING THE SQL SELECT STATEMENT Course Objectives List the capabilities of SQL SELECT statements Execute a basic SELECT statement Development Environments for SQL Lesson Agenda Basic SELECT
More informationSQL Queries. COSC 304 Introduction to Database Systems SQL. Example Relations. SQL and Relational Algebra. Example Relation Instances
COSC 304 Introduction to Database Systems SQL Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca SQL Queries Querying with SQL is performed using a SELECT statement. The general
More informationUsing the Set Operators. Copyright 2006, Oracle. All rights reserved.
Using the Set Operators Objectives After completing this lesson, you should be able to do the following: Describe set operators Use a set operator to combine multiple queries into a single query Control
More informationHandout 9 CS-605 Spring 18 Page 1 of 8. Handout 9. SQL Select -- Multi Table Queries. Joins and Nested Subqueries.
Handout 9 CS-605 Spring 18 Page 1 of 8 Handout 9 SQL Select -- Multi Table Queries. Joins and Nested Subqueries. Joins In Oracle https://docs.oracle.com/cd/b19306_01/server.102/b14200/queries006.htm Many
More informationReal-World Performance Training SQL Introduction
Real-World Performance Training SQL Introduction Real-World Performance Team Basics SQL Structured Query Language Declarative You express what you want to do, not how to do it Despite the name, provides
More informationCS2 Current Technologies Lecture 2: SQL Programming Basics
T E H U N I V E R S I T Y O H F R G E D I N B U CS2 Current Technologies Lecture 2: SQL Programming Basics Dr Chris Walton (cdw@dcs.ed.ac.uk) 4 February 2002 The SQL Language 1 Structured Query Language
More informationSet theory is a branch of mathematics that studies sets. Sets are a collection of objects.
Set Theory Set theory is a branch of mathematics that studies sets. Sets are a collection of objects. Often, all members of a set have similar properties, such as odd numbers less than 10 or students in
More informationCOSC 304 Introduction to Database Systems SQL. Dr. Ramon Lawrence University of British Columbia Okanagan
COSC 304 Introduction to Database Systems SQL Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca SQL Queries Querying with SQL is performed using a SELECT statement. The general
More informationCS2 Current Technologies Lecture 3: SQL - Joins and Subqueries
T E H U N I V E R S I T Y O H F R G E D I N B U CS2 Current Technologies Lecture 3: SQL - Joins and Subqueries Chris Walton (cdw@dcs.ed.ac.uk) 11 February 2002 Multiple Tables 1 Redundancy requires excess
More informationAn Introduction to Structured Query Language
An Introduction to Structured Query Language Alexandra Roatiş David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Winter 2016 CS 348 SQL Winter
More informationASSIGNMENT NO Computer System with Open Source Operating System. 2. Mysql
ASSIGNMENT NO. 3 Title: Design at least 10 SQL queries for suitable database application using SQL DML statements: Insert, Select, Update, Delete with operators, functions, and set operator. Requirements:
More informationDatabase design process
Database technology Lecture 2: Relational databases and SQL Jose M. Peña jose.m.pena@liu.se Database design process 1 Relational model concepts... Attributes... EMPLOYEE FNAME M LNAME SSN BDATE ADDRESS
More informationManipulating Data. Copyright 2004, Oracle. All rights reserved.
Manipulating Data Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement
More informationLecture7: SQL Overview, Oracle Data Type, DDL and Constraints Part #2
Lecture7: SQL Overview, Oracle Data Type, DDL and Constraints Part #2 Ref. Chapter6 Prepared by L. Nouf Almujally & Aisha AlArfaj& L.Fatima Alhayan Colleg Comp Informa Scien Informa Syst D 1 IS220 : Database
More informationDatabase Programming - Section 7. Instructor Guide
Database Programming - Section 7 Instructor Guide Table of Contents...1 Lesson 1 - Multiple-Row Subqueries...1 What Will I Learn?...3 Why Learn It?...4...5 Try It / Solve It...12 Lesson 2 - Practice Exercises
More informationDatabase Systems CSE 303. Outline. Lecture 06: SQL. What is Sub-query? Sub-query in WHERE clause Subquery
Database Systems CSE 303 Lecture 06: SQL 2016 Subquery Outline What is a Subquery Subquery in WHERE clause >ALL, >ANY, >=ALL,
More informationRelational Algebra. Mr. Prasad Sawant. MACS College. Mr.Prasad Sawant MACS College Pune
Relational Algebra Mr. Prasad Sawant MACS College Pune MACS College Relational Algebra Tuple - a collection of attributes which describe some real world entity. Attribute - a real world role played by
More informationRDBMS- Day 4. Grouped results Relational algebra Joins Sub queries. In today s session we will discuss about the concept of sub queries.
RDBMS- Day 4 Grouped results Relational algebra Joins Sub queries In today s session we will discuss about the concept of sub queries. Grouped results SQL - Using GROUP BY Related rows can be grouped together
More information1) Introduction to SQL
1) Introduction to SQL a) Database language enables users to: i) Create the database and relation structure; ii) Perform insertion, modification and deletion of data from the relationship; and iii) Perform
More informationRestricting and Sorting Data. Copyright 2004, Oracle. All rights reserved.
Restricting and Sorting Data Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Limit the rows that are retrieved by a query Sort
More informationAn Introduction to Structured Query Language
An Introduction to Structured Query Language Grant Weddell Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Winter 2017 CS 348 (Intro to DB Mgmt) SQL
More informationLecture3: Data Modeling Using the Entity-Relationship Model.
College of Computer and Information Sciences - Information Systems Dept. Lecture3: Data Modeling Using the Entity-Relationship Model. Ref. Chapter12 Prepared by L. Nouf Almujally & Aisha AlArfaj Rev. by
More informationFravo.com. Certification Made Easy. World No1 Cert Guides. Introduction to Oracle9i: SQL Exam 1Z Edition 1.0
Fravo.com Certification Made Easy M C S E, C C N A, C C N P, O C P, C I W, J A V A, S u n S o l a r i s, C h e c k p o i n t World No1 Cert Guides info@fravo.com Introduction to Oracle9i: SQL Exam 1Z0-007
More informationAn Introduction to Structured Query Language
An Introduction to Structured Query Language Grant Weddell Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2016 CS 348 (Intro to DB Mgmt) SQL
More informationCSC 261/461 Database Systems Lecture 5. Fall 2017
CSC 261/461 Database Systems Lecture 5 Fall 2017 MULTISET OPERATIONS IN SQL 2 UNION SELECT R.A FROM R, S WHERE R.A=S.A UNION SELECT R.A FROM R, T WHERE R.A=T.A Q 1 Q 2 r. A r. A = s. A r. A r. A = t. A}
More informationSQL STRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGE SQL Structured Query Language 4.1 Introduction Originally, SQL was called SEQUEL (for Structured English QUery Language) and implemented at IBM Research as the interface for an
More informationOracle 1Z Oracle Database 11g : SQL Fundamentals I. Download Full Version :
Oracle 1Z0-051 Oracle Database 11g : SQL Fundamentals I Download Full Version : http://killexams.com/pass4sure/exam-detail/1z0-051 Answer: D QUESTION: 183 View the Exhibits and examine the structures of
More informationLECTURE 3: ENTITY-RELATIONSHIP MODELING
LECTURE 3: ENTITY-RELATIONSHIP MODELING Ref. Chapter11 + Appendix F from Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. 1 IS220 : D a t
More informationOracle 1Z0-007 Introduction to Oracle9i: SQL 210 Q&A
Oracle 1Z0-007 Introduction to Oracle9i: SQL 210 Q&A Looking for Real Exam Questions for IT Certification Exams! We guarantee you can pass any IT certification exam at your first attempt with just 10-12
More informationCreating Other Schema Objects. Copyright 2004, Oracle. All rights reserved.
Creating Other Schema Objects Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Create simple and complex views Retrieve data
More informationData Manipulation Language
Manipulating Data Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement Insert rows into a table Update rows in a table
More informationDatabase Programming with SQL
Database Programming with SQL 2-1 Objectives This lesson covers the following objectives: Apply the concatenation operator to link columns to other columns, arithmetic expressions, or constant values to
More informationAn Introduction to Structured Query Language
An Introduction to Structured Query Language Grant Weddell David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2012 CS 348 (Intro to DB
More informationAn Introduction to Structured Query Language
An Introduction to Structured Query Language Grant Weddell David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2012 CS 348 (Intro to DB
More informationIn This Lecture. Yet More SQL SELECT ORDER BY. SQL SELECT Overview. ORDER BY Example. ORDER BY Example. Yet more SQL
In This Lecture Yet More SQL Database Systems Lecture 9 Natasha Alechina Yet more SQL ORDER BY Aggregate functions and HAVING etc. For more information Connoly and Begg Chapter 5 Ullman and Widom Chapter
More informationDatabase Technology. Topic 3: SQL. Olaf Hartig.
Olaf Hartig olaf.hartig@liu.se Structured Query Language Declarative language (what data to get, not how) Considered one of the major reasons for the commercial success of relational databases Statements
More informationLab # 6. Using Subqueries and Set Operators. Eng. Alaa O Shama
The Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Database Lab Lab # 6 Using Subqueries and Set Operators Eng. Alaa O Shama November, 2015 Objectives:
More informationGIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement
GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces
More informationSun Certified MySQL Associate
310-814 Sun Certified MySQL Associate Version 3.1 QUESTION NO: 1 Adam works as a Database Administrator for a company. He creates a table named Students. He wants to create a new table named Class with
More informationLimit Rows Selected. Copyright 2008, Oracle. All rights reserved.
What Will I Learn? In this lesson, you will learn to: Apply SQL syntax to restrict the rows returned from a query Demonstrate application of the WHERE clause syntax Explain why it is important, from a
More informationThree types of sub queries are supported in SQL are Scalar, Row and Table sub queries.
SQL Sub-Queries What are Sub queries? SQL Sub queries are the queries which are embedded inside another query. The embedded queries are called as INNER query & container query is called as OUTER query.
More informationUsing the Set Operators. Copyright 2004, Oracle. All rights reserved.
Using the Set Operators Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe set operators Use a set operator to combine
More informationExam Code: 1z Exam Name: Ineroduction to oracle9l:sql. Vendor: Oracle. Version: DEMO
Exam Code: 1z0-007 Exam Name: Ineroduction to oracle9l:sql Vendor: Oracle Version: DEMO Part: A 1: Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME
More informationWhy Relational Databases? Relational databases allow for the storage and analysis of large amounts of data.
DATA 301 Introduction to Data Analytics Relational Databases Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca DATA 301: Data Analytics (2) Why Relational Databases? Relational
More informationAdditional Practice Solutions
Additional Practice Solutions Additional Practices Solutions The following exercises can be used for extra practice after you have discussed the data manipulation language (DML) and data definition language
More information1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions
1Z0-051 Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-051 Exam on Oracle Database 11g - SQL Fundamentals I 2 Oracle 1Z0-051 Certification
More informationDatabases - 4. Other relational operations and DDL. How to write RA expressions for dummies
Databases - 4 Other relational operations and DDL How to write RA expressions for dummies Step 1: Identify the relations required and CP them together Step 2: Add required selections to make the CP Step
More informationChapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel
Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel 1 In this chapter, you will learn: The basic commands
More informationTables From Existing Tables
Creating Tables From Existing Tables After completing this module, you will be able to: Create a clone of an existing table. Create a new table from many tables using a SQL SELECT. Define your own table
More informationAggregate Functions. Eng. Mohammed Alokshiya. Islamic University of Gaza. Faculty of Engineering. Computer Engineering Dept. Database Lab (ECOM 4113)
Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 4 Aggregate Functions Eng. Mohammed Alokshiya October 26, 2014 Unlike single-row functions, group
More informationSTRUCTURED QUERY LANGUAGE (SQL)
STRUCTURED QUERY LANGUAGE (SQL) EGCO321 DATABASE SYSTEMS KANAT POOLSAWASD DEPARTMENT OF COMPUTER ENGINEERING MAHIDOL UNIVERSITY SQL TIMELINE SCOPE OF SQL THE ISO SQL DATA TYPES SQL identifiers are used
More informationQuerying Data with Transact-SQL
Course 20761A: Querying Data with Transact-SQL Page 1 of 5 Querying Data with Transact-SQL Course 20761A: 2 days; Instructor-Led Introduction The main purpose of this 2 day instructor led course is to
More informationDatabase Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved.
Database Foundations 6-3 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control
More informationTest Bank for Database Processing Fundamentals Design and Implementation 13th Edition by Kroenke
Test Bank for Database Processing Fundamentals Design and Implementation 13th Edition by Kroenke Link full download: https://testbankservice.com/download/test-bank-fordatabase-processing-fundamentals-design-and-implementation-13th-edition-bykroenke
More informationSQL Data Manipulation Language. Lecture 5. Introduction to SQL language. Last updated: December 10, 2014
Lecture 5 Last updated: December 10, 2014 Throrought this lecture we will use the following database diagram Inserting rows I The INSERT INTO statement enables inserting new rows into a table. The basic
More informationIn This Lecture. More SQL Select. SQL SELECT Overview. Aliases. Example. Example. More SQL Select. Database Systems Lecture 8 Natasha Alechina
In This Lecture More SQL Select Database Systems Lecture 8 Natasha Alechina More SQL Select Aliases Self-joins IN, EXISTS, ANY, ALL For more information Connoly and Begg Chapter 5 Ullman and Widom Chapter
More informationDatabase Programming with SQL
Database Programming with SQL 12-2 Objectives In this lesson, you will learn to: Construct and execute an UPDATE statement Construct and execute a DELETE statement Construct and execute a query that uses
More informationQuerying Data with Transact-SQL
Querying Data with Transact-SQL Course: 20761 Course Details Audience(s): IT Professional(s) Technology: Microsoft SQL Server 2016 Duration: 24 HRs. ABOUT THIS COURSE This course is designed to introduce
More informationCMP-3440 Database Systems
CMP-3440 Database Systems Advanced SQL Lecture 07 zain 1 Select Statement - Aggregates ISO standard defines five aggregate functions: COUNT returns number of values in specified column. SUM returns sum
More information