SQL Server 生成数据透视表
Create table s( [name] nvarchar(50), book nvarchar(50), saledNumber int ) insert into s ([name],book,saledNumber) values('小王','Excel教材',10); insert into s ([name],book,saledNumber)values('小李','Excel教材',15); insert into s ([name],bo
Create table s(
[name] nvarchar(50),
book nvarchar(50),
saledNumber int
)
insert into s ([name],book,saledNumber) values('小王','Excel教材',10);
insert into s ([name],book,saledNumber)values('小李','Excel教材',15);
insert into s ([name],book,saledNumber)values('小王','Word教材',8);
insert into s ([name],book,saledNumber)values('小李','Excel教材',7);
insert into s ([name],book,saledNumber)values('小王','Excel教材',9);
insert into s ([name],book,saledNumber)values('小李','Excel教材',2);
insert into s ([name],book,saledNumber)values('小王','Word教材',3);
insert into s ([name],book,saledNumber)values('小李','Excel教材',5);