- 博客(0)
- 资源 (2)
空空如也
行转列sql_server
sql server 用于行转列,省得各位去找语句,select to_char(wm_concat('''' || valuelabel || '''')) name
from (select distinct t.valuelabel
from structuredrecruit t)
select *
from (select t.uhid, t.form_name, valuelabel, max(valuedata) valuedata
from structuredrecruit t
group by t.uhid, t.form_name, valuelabel)
pivot(max(valuedata) valuedata
2018-12-11
删除作业表
想创建一个表,但在创建前先判断是否存在。如存在就删除它,不存在就创建。
IF EXISTS(SELECT * FROM sys.Tables WHERE name='test_table')
DROP TABLE test_table
go
2018-07-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人