How to use SQL Server with as recursion to get hierarchical relational data

Source: Internet
Author: User
Tags how to use sql server table name how to use sql

The meaning of with AS

The with as phrase, also called the subquery section (subquery factoring), lets you do a lot of things, define an SQL fragment that will
is used by the entire SQL statement. Sometimes, it is to make the SQL statement more readable, or it may be in different parts of union all, as the provision of several
According to the part.

Particularly useful for union all. Because each part of union all may be the same, the cost is too high if each part is executed.
So you can use the with as phrase, just do it once. If the table name defined by the with as phrase is called more than two times, the optimizer automatically
The data obtained by the with as phrase is placed in a temp table, and if it is only invoked once, it will not. And the hint materialize is to force the with AS
The data in the phrase is placed in a global temporary table. Many queries can improve speed in this way.

The following is a detailed description of the second application scenario mentioned above:

Create a table of enterprise employees, table database design as follows:

CREATE TABLE [dbo]. [Employee] (   
    [ID] [uniqueidentifier] NOT NULL,--user ID   
    [enterprisecode] [uniqueidentifier] NOT NULL,--enterprise Identity   
    [ PARENTGUID] [uniqueidentifier] NOT NULL,--parent ID   
    [ecode] [nvarchar] () NOT NULL,--employee number   
    [ename] [nvarchar] (200) Not null--employee name   
 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 [P Rimary] Go   
       

Insert initial data as follows

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 ' Zhang ') 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 ' Dugoyan ') 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 ' Zhao Bin ') 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 ' Panyu ') 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 ' Zhang Zhonglong ') 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 ' Sun Yue light ') 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 ' Yu Yao ') 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 ' Hejazuo ') 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 ' Jiang hui ') 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 ' Miaoying Hieizan ') 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 ' Chai Tianyuan ') 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 ' 师萱 Qian ') 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 ' Zhanghuibao ') 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 ' Shaole home ') 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 ' li Heng fishing ') go INSERT [dbo]. [Employee] ([ID], [Enterprisecode], [Parentguid], [Ecode], [ename]) VALUES (n ' c5e537d4-0994-43e2-a1ab-3f736b4e22d3 ', n ' 06bc0b1c-25b8-4d62-a1d6-ac7be1becf", n ' ef7c0c60-2545-4c5a-baa6-1a0eec3557b3 ', n ' KP10015 ', n ' Gao Gaorang ') 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 ' Buwan ') 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 ' Souxiao will ') 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 ' Xiachengrong ') 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 ' horse gladly ') 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 ' Liu Wenqiang ') 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 ' Xu Lianxiang ') 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 ' silver Jia Shu ') 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 ' Zhao ') 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 ' Sching ') 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 ' Jindi same ') 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 ' Wu Qi Yi ') 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 ' Wang Sueping ') 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 ' Gu Cheng ') 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 ' Shaoyan ') 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 ' Zhu Ziyi ') 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 ' Yiao Lin shu ') 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 ' Liu Qian ') 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 ' Liu Guangdou ') 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 ' Fangwendong ') 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 ' zhaobin ') 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 ' Liu Good ') 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 ' Ba Yuanliang ') 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 ' continue non ') 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 ' Zhangze rain ') 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 ' Zhang Yachun ') 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 ' Bfei feather ') 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 ' Zhang Zhongli ') 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 ' Mao Yan ') 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 ' Jie Gao Yi ') go to see more highlights in this column: Http://www.bianceng.cnhttp://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 ' Cheng ') 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 ' Liude ') 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 ' Chaofang ') 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 ' Neith bo ') 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 ' Rush Force ') 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 ' Zhang Zongmin ') 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 ' Liu Jinjie ') 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 ' Cheng Rong ') 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 ' dry new Ji ') 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 ' Sao ') 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 ' Zhangli ') 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 ' climb Hong Yi ') 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 ' di Ying ') 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 ' Chote and ') 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 ' mean ') 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 ' along Cheng Li ') 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 ' Check Taining ') 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 ' state and amiable ') 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 ' Fangjia ') 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 ' Zhaofeng ') 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 ' Wu Jian will ') 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 ' Yingxiaven ') 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 ' Tong wo ') 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 ' Yang Yi ') 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 ' calendar-ho ') 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 ' smelting star ') 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 ' Zhaopeu ') 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 ' Yiu Ting hui ') 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 ' Ye Nanan ') 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 ' Fan Sha ') 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 ' Zhao Chunfeng ') 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 ' Yiu Jing ') 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 ' Zhao FushengTao ') 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 ' Yellow Aihui ') 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 ' Ancient letter thick ') 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 ' Zhang Lei ') 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 ' Yang Yi ') go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.