--查出每個(gè)雇員的所有數(shù)據(jù)
select *
from Employees
--查詢(xún)Employees表中每個(gè)雇員的地址和電話(huà)
select Address, PhoneNumber
from Employees

Employees表中每個(gè)雇員的地址和電話(huà)
--查詢(xún)EmployeesID為000001的雇員的地址和電話(huà)
select Address, PhoneNumber
from Employees
where EmployeeID='000001'
go

000001的雇員的地址和電話(huà)
--查詢(xún)?cè)率杖敫哂?000元的員工號(hào)碼
select EmployeeID
from Salary
where InCome > 2000
go

月收入高于2000元的員工號(hào)碼
--查詢(xún)1970年以后出生的員工的姓名和住址
select Name, Address
from Employees
where Birthday >= '1970-01-01'
go

1970年以后出生的員工的姓名和住址
--查詢(xún)所有財(cái)務(wù)部員工的號(hào)碼和姓名
select PhoneNumber, Name
from Employees
where DepartmentID =
(select DepartmentID
from Departments
where DepartmentName = '財(cái)務(wù)部')
go

所有財(cái)務(wù)部員工的號(hào)碼和姓名