Showing posts with label Sql Server queries for practice. Show all posts
Showing posts with label Sql Server queries for practice. Show all posts

Saturday, 13 April 2013

SQL Server Queries for Practice


Written By:- Isha Malhotra
Our Website:-Tech Altum

45 SQL Server Queries for Practice (1-20) - Part 1


Following is the Employee Table which contains the detail for the Employee with department id and head id. Head of the employee is also an another employee
Table:-Employee
EmpId
EmpName
Department
ContactNo
EmailId
EmpHeadId
101
Isha
E-101
1234567890
abc@yahoo.com
105
102
Priya
E-104
1234567890
abc@gmail.com
103
103
Neha
E-101
1234567890
abc@gmail.com
101
104
Rahul
E-102
1234567890
abc@ymail.com
105
105
abhishek
E-101
1234567890
abc@gmail.com
102

Table:-EmpDept
DeptId
DeptName
DeptHead
E-101
HR
105
E-102
Development
101
E-103
House Keeping

E-104
sales
104
E-105
purchase
104