Displaying data from 2 tables

Slides:



Advertisements
Similar presentations
WHERE Clause Chapter 2. Objectives Limit rows by using a WHERE clause Use the LIKE operator Effect of NULL values Use compound conditions Use the BETWEEN.
Advertisements

Step By Step Lei Yang Computer Science Department.
Example T1: T2: Constraint: Susan’s salary = Jane’s salary
Jan. 2014Dr. Yangjun Chen ACS Database security and authorization (Ch. 22, 3 rd ed. – Ch. 23, 4 th ed. – Ch. 24, 6 th )
CENTURY 21 ACCOUNTING © 2009 South-Western, Cengage Learning LESSON 3-1 Completing Payroll Records for Employee Earnings and Deductions.
Income Statement Net Sales - COGS = Gross Profit - Operating Expenses = Operating Income - Interest expenses & taxes = Net Income.
1 times table 2 times table 3 times table 4 times table 5 times table
Using ICT in Organisations
FINANCIAL MANAGEMENT GUIDE © Marin Management, Inc General Accounting Procedures, 7141 Departmental Expense Allocations A. The Purpose of This.
CENTURY 21 ACCOUNTING © Thomson/South-Western LESSON 3-1 Completing Payroll Records for Employee Earnings and Deductions Modified by D. Burns West Johnston.
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
CENTURY 21 ACCOUNTING © Thomson/South-Western LESSON 3-1 Completing Payroll Records for Employee Earnings and Deductions.
Data Definition Language Using sqldeveloper. To create connection Create new connection (any name) Username: sys Password: oracle11 Tick on Save password.
Independent Contractor or Federal ID # Determine if vendor is using SS# or Fed. ID # by sending vendor a Form 204
Multiple Table Queries (Inner Joins) Week 3. Objective –Write SELECT statements to display data from more than one table using inner joins.
MS Access. Access is a DBMS/RDMS DBMS = Database Management System RDMS = Relational Database Management System.
SQL Basics. What is SQL? SQL stands for Structured Query Language. SQL lets you access and manipulate databases.
E-R to Relational - Basic
Unit 2  Topic:  Company organization chart  Company objective.
Relational Algebra Sample Questions.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
VIEWS A view is like a window through which one can view or change information in the table. Although view does not contain any data of their own. They.
Tony Roupell K2 Technical Sales Specialist K2 Australia.
Tables Learning Support
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Special Joins Week 4. Objective –Write SELECT statements to display left, right and full outer joins.
Writing Basic SQL SELECT Statements
DML – INSERT COMMAND TABLE - EMPLOYEE ID NAME PLACE DOB SALARY 1 ARUN
Income Statement accounts
Comparison Operators Relational Operators.
Business Partners Sold-to party Ship-to party Partner
Working with Tables: Join, Functions and Grouping
Times Tables.
Start Career in Sales & Marketing. Advancement in a Company.
الفصل الثاني الصيغة العامة لجمله select*
2012 סיכום מפגש 2 שלב המשכי תהליך חזוני-אסטרטגי של המועצה העליונה של הפיזיותרפיה בישראל.
ERM Systems.
مدل زنجیره ای در برنامه های سلامت
EXTERNAL SALES CONTRACTS QUERY
The sales department at Windways receives purchase orders from customers (contractors) for fans. The sales clerk enters the customer name into the computer.
Grouping Summary Results
Structured Query Language
Sharplex Strength. Sharplex Strength.
Php&SQL evaluation.
The sales department at Windways receives purchase orders from customers (contractors) for fans. The sales clerk enters the customer name into the computer.
The sales department at Windways receives purchase orders from customers (contractors) for fans. The sales clerk enters the customer name into the computer.
Using CASE Value expression
MEASURING PRODUCTIVITY
In Class Exercises Phil Tayco Slide version 1.1 San Jose City College
Additional Practices Table Descriptions and Data.
CS639: Data Management for Data Science
Engine Part ID Part 1.
Aggregate functions Objective- understand and able to use aggregate functions in select statement Aggregate functions are used to implement calculation.
SQL – Select query Waq to display the employees with no commission.
Introduction to Relational databases
Topic – select statement with ‘between’, ‘not between’ , ‘like’ operators Objective: 1) Able to use between’, ‘not between’ , ‘like’ operators in ‘select’
Topic - DML - Select statement
Engine Part ID Part 2.
Engine Part ID Part 2.

3 times tables.
6 times tables.
‘ORDER BY’ Order by clause allows sorting of query results by one or more columns. Sorting can be done in ascending or descending. Default order is ascending.
Print or display a list of all records where the state is equal to either MA or RI. EndLOOP problems. The loop is the only thing that will be different.
Print a list of all people in department 15 who either are salaried and make more than or are part time or full time and make more than 25 per hour.
From source statistics to input for Supply and Use tables
Business Intent Presentation
Presentation transcript:

Displaying data from 2 tables TABLE - EMPLOYEE Select * from employee,department where employee.deptid=department.deptid; ID NAME SALARY DeptId 1 ARUN 6000 2 VARUN 8000 3 ALI 9000 4 GEORGE 12000 5 MOHD output ID NAME SALARY DeptId deptid Dep_name 1 ARUN 6000 Marketing 2 VARUN 8000 Accounts 3 ALI 9000 4 GEORGE 12000 Sales 5 MOHD TABLE - department deptID Dep_NAME 1 Marketing 2 Accounts 3 Sales

Displaying data from 2 tables TABLE - EMPLOYEE Select employee.*, dep_name from employee, department where employee.deptid=department.deptid; ID NAME SALARY DeptId 1 ARUN 6000 2 VARUN 8000 3 ALI 9000 4 GEORGE 12000 5 MOHD output ID NAME SALARY DeptId Dep_name 1 ARUN 6000 Marketing 2 VARUN 8000 Accounts 3 ALI 9000 4 GEORGE 12000 Sales 5 MOHD TABLE - department deptID Dep_NAME 1 Marketing 2 Accounts 3 Sales

Displaying data from 2 tables TABLE - EMPLOYEE WAQ to display employee name and department name of all employees. ID NAME SALARY DeptId 1 ARUN 6000 2 VARUN 8000 3 ALI 9000 4 GEORGE 12000 5 MOHD Select name, dep_name from employee,department where employee.deptid = department.deptid; output NAME dep_name ARUN Marketing VARUN Accounts ALI GEORGE Sales MOHD TABLE - department deptID Dep_NAME 1 Marketing 2 Accounts 3 Sales

Find the output TABLE - EMPLOYEE Select name, dep_name from employee,department where employee.deptid = department.deptid; ID NAME SALARY DeptId 1 ARUN 6000 2 VARUN 8000 3 ALI 9000 4 GEORGE 12000 5 MOHD output NAME dep_name ARUN Marketing VARUN Accounts ALI TABLE - department deptID Dep_NAME 1 Marketing 2 Accounts 3 Sales