Download presentation
Presentation is loading. Please wait.
1
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
2
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
3
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
4
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.