程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SqlServer數據庫 >> 關於SqlServer >> 如何利用SQL Server With As遞歸獲取層級關系數據

如何利用SQL Server With As遞歸獲取層級關系數據

編輯:關於SqlServer

WITH AS的含義

WITH AS短語,也叫做子查詢部分(subquery factoring),可以讓你做很多事情,定義一個SQL片斷,該SQL片斷會
被整個SQL語句所用到。有的時候,是為了讓SQL語句的可讀性更高些,也有可能是在UNION ALL的不同部分,作為提供數
據的部分。

特別對於UNION ALL比較有用。因為UNION ALL的每個部分可能相同,但是如果每個部分都去執行一遍的話,則成本太高,
所以可以使用WITH AS短語,則只要執行一遍即可。如果WITH AS短語所定義的表名被調用兩次以上,則優化器會自動將
WITH AS短語所獲取的數據放入一個TEMP表裡,如果只是被調用一次,則不會。而提示materialize則是強制將WITH AS
短語裡的數據放入一個全局臨時表裡。很多查詢通過這種方法都可以提高速度。

下面就上面提到的第二個應用場景來詳細介紹下:

創建一張企業員工表,表數據庫設計如下:

CREATE TABLE [dbo].[Employee](   
    [ID] [uniqueidentifier] NOT NULL,--用戶ID   
    [EnterpriseCode] [uniqueidentifier] NOT NULL,--企業標識   
    [ParentGUID] [uniqueidentifier] NOT NULL,--上級ID   
    [ECode] [nvarchar](50) NOT NULL,--員工編號   
    [EName] [nvarchar](200) NOT NULL--員工名稱   
 CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED    
(   
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]   
) ON [PRIMARY]   
       
GO

插入初始數據如下

INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'5b82d74d-c5c7-4cbb-af28-0518bdc257d9', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'00000000-0000-0000-0000-000000000000', N'SG0012', N'張志軍')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'0cd19311-2ca1-4120-9554-11bfd8219af9', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'5b82d74d-c5c7-4cbb-af28-0518bdc257d9', N'KP10035', N'杜高揚')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'dd994fda-1703-4616-af1b-165164df710e', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'5b82d74d-c5c7-4cbb-af28-0518bdc257d9', N'SG0005', N'趙賓 ')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'ef7c0c60-2545-4c5a-baa6-1a0eec3557b3', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'5b82d74d-c5c7-4cbb-af28-0518bdc257d9', N'KP10029', N'屠玉韻')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'557c113a-786a-4dbc-9eb6-1aa80cfd9e68', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'5b82d74d-c5c7-4cbb-af28-0518bdc257d9', N'0119', N'陳佳楠')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'80012614-b153-4bc6-b5da-0db244cccf9b', N'SG0001', N'張忠榮')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'5c8214ec-258b-4c44-9f31-206e499f0285', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0cd19311-2ca1-4120-9554-11bfd8219af9', N'0129', N'孫躍光')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'df5d082c-baa3-4315-b234-209b50c37e7a', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0cd19311-2ca1-4120-9554-11bfd8219af9', N'0109', N'姚宇')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'5d68e6c2-6e7e-4608-8cd2-234557fcacef', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0cd19311-2ca1-4120-9554-11bfd8219af9', N'KP10040', N'賀雅柔')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'9627fdcf-affa-424b-b1ca-24538b101986', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0cd19311-2ca1-4120-9554-11bfd8219af9', N'0120', N'簡婧晖')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'6eccd0ec-11ad-45e3-98b6-2457cf61da2e', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'dd994fda-1703-4616-af1b-165164df710e', N'KP10027', N'苗英叡')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'1416b56c-d54a-41eb-83c2-25573cb25f4b', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'dd994fda-1703-4616-af1b-165164df710e', N'KP10013', N'柴天元')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'868030db-7f25-4bc0-8ff7-259759426250', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'dd994fda-1703-4616-af1b-165164df710e', N'0114', N'師萱倩')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'a81a9114-b7c9-41b6-818e-2a418e3dd14d', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'dd994fda-1703-4616-af1b-165164df710e', N'0125', N'張懷寶')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'166fa95a-0425-40e3-8cb9-2a4c97ca4cc6', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'ef7c0c60-2545-4c5a-baa6-1a0eec3557b3', N'KP10025', N'邵樂家')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'6e94aa52-700a-4415-bb8a-34345605e13d', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'ef7c0c60-2545-4c5a-baa6-1a0eec3557b3', N'SG0011', N'李恆釣')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'c5e537d4-0994-43e2-a1ab-3f736b4e22d3', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'ef7c0c60-2545-4c5a-baa6-1a0eec3557b3', N'KP10015', N'龔高朗')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'61f79eaf-db86-425e-a61c-4228265eec28', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'ef7c0c60-2545-4c5a-baa6-1a0eec3557b3', N'KP10038', N'卜婉慧')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'34c26725-3726-4c45-90c0-440c91ef34b8', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'ef7c0c60-2545-4c5a-baa6-1a0eec3557b3', N'0105', N'蘇曉會')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'3d09264c-5a0d-46fd-b924-443585ad61bc', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'557c113a-786a-4dbc-9eb6-1aa80cfd9e68', N'KP10026', N'夏成龍')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'30b558f3-be74-4127-b91f-444e858ef9ff', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'557c113a-786a-4dbc-9eb6-1aa80cfd9e68', N'KP10004', N'馬樂意')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'4b1d5979-1ef7-4927-9b6b-44f151d2d803', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'557c113a-786a-4dbc-9eb6-1aa80cfd9e68', N'0110', N'劉文強')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'0107', N'徐連翔')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'ee09d65c-8780-4736-b636-4d9335bfdd80', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'KP10028', N'銀嘉樹')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'94e3071a-6b00-4f53-9dd0-4fe0fc9bef51', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'0126', N'趙碩')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'123580a5-25c7-4315-b75b-584e86fe945e', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'KP10018', N'刁意智')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'119d1cd2-c8af-4a7e-a1be-5eed11011e09', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'KP10033', N'金季同')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'c7da19df-a45b-4441-9c0e-5f216f5b1950', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'KP10006', N'烏奇逸')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'07912b56-dd54-44f2-b251-61d1e0537c7f', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'0112', N'汪素萍')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'bc9ac28d-010b-45bc-b10b-63998c97c058', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'KP10014', N'古承顏')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'df2d222f-e009-4fa9-b0e4-63c81f4c9976', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'c5b58ce6-96b7-496d-bceb-1e7c659badbd', N'0106', N'郝曉妍')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'34569802-4a83-4851-86cb-678b254850ba', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10031', N'朱自怡')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'a4129729-a96f-44e1-908e-6a2c4e7ba5fa', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'0128', N'姚林蜀')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'd37c7008-c98d-4374-b153-6cc93e1a39ce', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'0102', N'劉倩')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'0122', N'劉廣斗')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'c8cf644a-af3f-427b-b7f8-6dc79170259e', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10034', N'房文棟')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'e28d744e-c22f-4fce-9155-6f79d8b426dc', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'SG0013', N'趙斌 ')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'a28b560a-6069-48b8-bb0c-718154b35d42', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'0117', N'劉好')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'38998b88-0425-466c-9197-73a731bed720', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10003', N'巴元良')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'c2de93d0-44d9-4fff-b4aa-74872f315df6', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'0115', N'續非')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'2159a71e-c7d5-4a6d-8719-7971834a6a17', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'0104', N'莊澤雨')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'c439c6bf-45fe-4274-9a89-7a650d9500ba', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'SG0010', N'張亞春')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'd85ba73e-9095-4f1d-b58d-7c02a5396bea', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10011', N'卜飛羽')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'ddf77f91-23fd-48b9-b114-7ef96b6af839', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'SG0002', N'張仲禮')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'b462147f-b47f-46b8-86f4-8042911d25aa', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'0103', N'毛婧')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'194b51e7-285f-4e3b-b723-8b2a568030e1', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10022', N'颉高懿')   
GO
查看本欄目更多精彩內容:http://www.bianceng.cn/database/SQLServer/   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'f02647c7-e8c7-4f7b-b007-8dd86e679f27', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10010', N'樊振國')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'fcd56ee6-6658-4337-bda4-98b0e2c5bced', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10016', N'柳德運')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'a949e892-f1a8-4cfc-8aa7-98cfb33a8607', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'SG0006', N'趙芳 ')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'6c20a6f8-f629-4d09-9c66-99c8ec19b9ee', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10036', N'聶思博')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'16b69138-c66a-4ff4-b770-9a239f51403a', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'KP10008', N'蔺力強')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'fde7c22c-b6e9-43e5-93c0-a0f548a8fe28', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'SG0003', N'張宗敏')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'a4c474a4-d885-4ecd-970e-a131abd459fc', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'bdc8cbdc-3511-41dc-899c-4b61969ff65c', N'0118', N'劉晉傑')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'309b57d7-8db3-4f06-bd2d-a33cdae8a2b2', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10005', N'聞成龍')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'f9ee4009-aa1f-4382-be0c-a40ebe77d91f', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10020', N'干新霁')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'ee7f3171-e7e7-468a-9a97-a47367fa62f9', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10032', N'邝和澤')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'54c86d68-4d75-42d4-8687-aa60148408b0', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'0127', N'張莉')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'7d7c0c91-b4d2-45b0-820e-ab36303976d7', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10017', N'攀弘毅')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'513f792c-4e49-4d5b-8d27-acff8c39cf3c', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10002', N'邸英武')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'f8e70a5b-075b-4485-a56c-af7e1e3caffe', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10001', N'喬泰和')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'cf1ebf4f-eeda-4681-91f5-c24864b791ab', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10019', N'言意致')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'7c8d67fc-9f69-4fb9-a6df-c9ad7a24dd8b', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10012', N'沿成禮')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'f7a2bd1d-e7ed-418b-8366-ca749d2a4f71', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10009', N'查泰寧')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'14291e5f-0ab7-433a-88b7-ccd860658e38', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10024', N'國和悅')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'dd0bde40-5f56-48de-992b-ce92689421b9', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'KP10023', N'房嘉佑')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'66ee973d-c1ca-4ad8-9a57-d0acdd26d901', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'0e2ead0b-4f6a-42e6-b954-6cf141fd025f', N'SG0007', N'趙鋒 ')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'fee614d1-29ca-4392-9339-d128b7568adc', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'0121', N'吳健會')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'92a0438c-03e2-4570-9322-d1372be54001', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'KP10039', N'殷霞文')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'cc63d7ef-1a72-4ad9-921a-d1e898147faa', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'0108', N'童禾')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'0ed98987-240b-4c86-9f48-d26d3402536c', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'0123', N'楊轶')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'3e8ce818-43e4-486e-8bc6-da63899b9df9', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'KP10007', N'歷浩言')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'99d3f991-3000-4720-bc9f-df2714b8ce79', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'KP10021', N'冶星文')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'908c3232-a15a-49f2-a4fa-e21e2ebe29be', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'SG0004', N'趙標 ')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'b0ad74df-71e2-480c-9cf0-e9f036ac42c4', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'0116', N'姚添慧')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'd85e67ea-e03c-472c-a249-eee76ff36524', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'0111', N'葉楠楠')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'7bde57d9-da29-4474-8820-ef3b9b2fa8e7', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'KP10037', N'范夏岚')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'e28b7754-d943-4129-a8c4-ef60dfbe28e2', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'SG0014', N'趙春風')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'd4929e92-d34f-4223-b609-f1b6b7ff5a07', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'0124', N'姚靜')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'9a150666-fac1-4ba1-bc63-f2bf3f0055f1', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'SG0008', N'趙福濤')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'1fd9eec8-998b-4808-b963-f8bf3b7052b3', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'0113', N'黃愛輝')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'7ba375aa-756b-4065-aa9a-fb3029c9b208', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'KP10030', N'古信厚')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'48ce3cc3-cfc2-4cf2-92d3-fbf87e0200c0', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'b462147f-b47f-46b8-86f4-8042911d25aa', N'SG0009', N'張雷 ')   
GO   
INSERT [dbo].[Employee] ([ID], [EnterpriseCode], [ParentGUID], [ECode], [EName]) VALUES (N'0bca35ad-91b7-46f5-83b0-ffcdfdfe8d50', N'06bc0b1c-25b8-4d62-a1d6-ac7be1becf56', N'557c113a-786a-4dbc-9eb6-1aa80cfd9e68', N'0101', N'楊碩')   
GO

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved