34,593
社区成员
发帖
与我相关
我的任务
分享
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[treetest](
[id] [int] IDENTITY(1,1) NOT NULL,
[pid] [int] NULL,
[category] [varchar](30) NULL,
[number] [float] NULL,
[price] [float] NULL,
[total] [float] NULL,
CONSTRAINT [PK_treetest] 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 [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
insert into treetest (category,number,price,total) values ('水果',106,2.2,233.2)
insert into treetest (pid,category,number,price,total) values (1,'南方水果',18,2,36)
insert into treetest (pid,category,number,price,total) values (1,'北方水果',88,2.4,211.2)
insert into treetest (pid,category,number,price,total) values (3,'苹果',10,1,10)
insert into treetest (pid,category,number,price,total) values (3,'梨',22,2,44)
insert into treetest (pid,category,number,price,total) values (3,'桃',42,3,126)
insert into treetest (pid,category,number,price,total) values (3,'杏',6,4,24)
insert into treetest (pid,category,number,price,total) values (2,'芒果',5,2,10)
insert into treetest (pid,category,number,price,total) values (2,'香蕉',6,3,18)
insert into treetest (pid,category,number,price,total) values (2,'荔枝',7,1,7)
insert into treetest (pid,category,number,price,total) values (3,'葡萄',8,2,16)