Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UPDATE Employees
- SET
- JobTitle = 'Senior ' + JobTitle,
- Salary = 1.5 * Salary,
- HireDate = GETDATE(),
- --this does not work, why?
- ManagerID = (SELECT M.EmployeeID FROM Employees M WHERE M.LastName = 'Tamburello')
- FROM Employees E
- INNER JOIN Departments D
- ON D.DepartmentID = E.DepartmentID
- WHERE D.Name = 'Engineering'
- UPDATE Employees
- SET
- JobTitle = 'Senior ' + JobTitle,
- Salary = 1.5 * Salary,
- HireDate = GETDATE(),
- --this works:
- ManagerID = 3
- FROM Employees E
- INNER JOIN Departments D
- ON D.DepartmentID = E.DepartmentID
- WHERE D.Name = 'Engineering'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement