-
列轉行2 select user_name,'arms' as equipment, arms from user1 a join user1_equipment b on a.id=user_id union all select user_name,'clothing' as equipment, clothing from user1 a join user1_equipment b on a.id=user_id; union all select user_name,'shoe' as equipment, shoe from user1 a join user1_equipment b on a.id=user_id;查看全部
-
列轉行 select user_name,replace(substring(substring_index(mobile,','a.id),char_length(substring_index(mobile,',',a.id-1))+1),',','') as mobile from tb_sequence as a cross join( select user_name,concat(mobile,',') as mobile,length(mobile)-length(replace(mobile,',',''))+1 as size from user1 as b) as b on a.id<=b.size查看全部
-
行列轉換 declare @sql nvarchar(1000) set @sql='select cl ' select @sql=@sql+',sum(case when ck='''+ck+''' then sl else 0 end) as '''+ck+'''' from table1 group by ck set @sql=@sql+' from table1, group by cl' execute sp_execute sql @sql查看全部
-
刪除字段中的重復數據查看全部
-
case實現行轉列。查看全部
-
處理重復數據查看全部
-
存儲過程查看全部
-
創建序列查看全部
-
列轉行的情景查看全部
-
先實現列轉行,用上節簡單刪除,再轉回來查看全部
-
更復雜的情況查看全部
-
刪除重復數據查看全部
-
有很好的并發性查看全部
-
調用存儲過程來生成特殊的序列號查看全部
-
唯一序列號生成原則查看全部
舉報
0/150
提交
取消