DECLARE @temp TABLE( id INT, name VARCHAR(20), [INDEX] INT, [GROUP] INT )
INSERT @temp( id, name, [INDEX], [GROUP] )
VALUES
( 953, '项目953', 27, 2 ),
( 954, '项目954', 6, 1 ),
( 955, '项目955', 31, 2 ),
( 817, '项目817', 1, 1 ),
( 818, '项目818', 1, 2 ),
( 819, '项目819', 1, 3 ),
( 822, '项目822', 2, 1 ),
( 823, '项目823', 2, 2 ),
( 824, '项目824', 2, 3 ),
( 827, '项目827', 3, 1 ),
( 828, '项目828', 3, 2 ),
( 829, '项目829', 3, 3 ),
( 832, '项目832', 4, 1 ),
( 833, '项目833', 4, 2 ),
( 834, '项目834', 4, 3 ),
( 837, '项目837', 5, 1 ),
( 838, '项目838', 5, 2 ),
( 839, '项目839', 5, 3 ),
( 842, '项目842', 7, 1 ),
( 843, '项目843', 6, 2 ),
( 844, '项目844', 6, 3 ),
( 847, '项目847', 8, 1 ),
( 848, '项目848', 7, 2 ),
( 849, '项目849', 7, 3 ),
( 852, '项目852', 9, 1 ),
( 853, '项目853', 8, 2 ),
( 854, '项目854', 8, 3 ),
( 857, '项目857', 10, 1 ),
( 858, '项目858', 9, 2 ),
( 859, '项目859', 9, 3 ),
( 862, '项目862', 10, 1 ),
( 863, '项目863', 10, 2 ),
( 864, '项目864', 10, 3 ),
( 867, '项目867', 11, 1 ),
( 868, '项目868', 11, 2 ),
( 869, '项目869', 11, 3 ),
( 872, '项目872', 11, 1 ),
( 873, '项目873', 12, 2 ),
( 874, '项目874', 12, 3 ),
( 877, '项目877', 12, 1 ),
( 878, '项目878', 13, 2 ),
( 879, '项目879', 13, 3 ),
( 882, '项目882', 13, 1 ),
( 883, '项目883', 14, 2 ),
( 884, '项目884', 14, 3 ),
( 887, '项目887', 14, 1 ),
( 888, '项目888', 15, 2 ),
( 889, '项目889', 15, 3 ),
( 892, '项目892', 15, 1 ),
( 893, '项目893', 16, 2 ),
( 894, '项目894', 16, 3 ),
( 897, '项目897', 16, 1 ),
( 898, '项目898', 17, 2 ),
( 899, '项目899', 17, 3 ),
( 902, '项目902', 17, 1 ),
( 903, '项目903', 18, 2 ),
( 904, '项目904', 18, 3 ),
( 907, '项目907', 19, 1 ),
( 908, '项目908', 19, 2 ),
( 909, '项目909', 19, 3 ),
( 912, '项目912', 18, 1 ),
( 913, '项目913', 20, 2 ),
( 914, '项目914', 20, 3 ),
( 917, '项目917', 19, 1 ),
( 918, '项目918', 21, 2 ),
( 919, '项目919', 21, 3 ),
( 922, '项目922', 20, 1 ),
( 923, '项目923', 22, 2 ),
( 924, '项目924', 22, 3 ),
( 927, '项目927', 21, 1 ),
( 928, '项目928', 22, 2 ),
( 929, '项目929', 23, 3 ),
( 932, '项目932', 22, 1 ),
( 933, '项目933', 23, 2 ),
( 934, '项目934', 24, 3 ),
( 937, '项目937', 23, 1 ),
( 938, '项目938', 24, 2 ),
( 939, '项目939', 28, 2 ),
( 942, '项目942', 24, 1 ),
( 943, '项目943', 25, 2 ),
( 944, '项目944', 25, 3 ),
( 946, '项目946', 25, 1 ),
( 947, '项目947', 26, 2 ),
( 948, '项目948', 26, 3 ),
( 949, '项目949', 26, 1 ),
( 950, '项目950', 29, 2 ),
( 951, '项目951', 27, 1 ),
( 952, '项目952', 30, 2 )
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
单组的是数据库本身的表
想查成多组的样子怎么办?
[此贴子已经被作者于2020-7-26 03:30编辑过]