左外连接

CREATE PROCEDURE [dbo].[up_AccountItemSelectALL]

AS

SELECT a.AccountGuid, a.AccountCategory, a.AccountName, a.AccountFSCode, a.DICGuid, a.IsObsoleted, d.DepartmentName, d.DepartmentCode FROM dbo.T_AccountItem AS a

LEFT OUTER JOIN dbo.T_Department AS d

ON a.DICGuid = d.DepartmentGuid

ORDER BY a.AccountCategory

 

 

create proc up_DeleteEmp2DeptBYGuid

@EmployeeGuid uniqueidentifier

as delete from dbo.T_Emp2Dept where EmployeeGuid=@EmployeeGuid

posted @ 2012-12-06 14:36  717806198  阅读(154)  评论(0编辑  收藏  举报