1. create view EmpHierarchy
as
select Employees.EmployeeID, Employees.FirstName, Employees.LastName, boss. FirstName
from Employees, Employees as boss
where Employees.ReportsTo=boss.EmployeeID
2. update EmpHierarchy set LastName='Jones' where EmployeeID=4
3. drop view EmpHierarchy
4. declare SuppliersCursor cursor scroll
For
select * from Suppliers
where Country='UK' or Country='USA'
open SuppliersCursor
fetch first from SuppliersCursor
fetch last from SuppliersCursor
close SuppliersCursor
deallocate SuppliersCursor
Nuk ka komente:
Posto një koment