1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| CREATE TABLE [GOODS] ( [ID] [BIGINT] IDENTITY (1, 1) NOT NULL , [CLASS] [VARCHAR] NULL , [GOODSNAME] [VARCHAR] (50) COLLATE CHINESE_PRC_CI_AS NULL , [CONTENT] [TEXT] COLLATE CHINESE_PRC_CI_AS NULL , CONSTRAINT [PK_GOODS] PRIMARY KEY CLUSTERED ( [ID] ) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO
CREATE TABLE [GOODSEXTPROPERTY] ( [ID] [BIGINT] IDENTITY (1, 1) NOT NULL , [CLASS] [VARCHAR] NULL , [TYPE] [VARCHAR] (50) COLLATE CHINESE_PRC_CI_AS NULL , [TEXT] [VARCHAR] (50) COLLATE CHINESE_PRC_CI_AS NULL , [REMARK] [VARCHAR] (500) COLLATE CHINESE_PRC_CI_AS NULL , CONSTRAINT [PK_GOODSEXTPROPERTY] PRIMARY KEY CLUSTERED ( [ID] ) ON [PRIMARY] ) ON [PRIMARY] GO
CREATE TABLE [GOODSEXTPROPERTYVALUE] ( [ID] [BIGINT] IDENTITY (1, 1) NOT NULL , [GOODSID] [BIGINT] NULL , [PROPERTYID] [BIGINT] NULL , [VALUES] [VARCHAR] (5000) COLLATE CHINESE_PRC_CI_AS NULL , CONSTRAINT [PK_GOODSEXTPROPERTYVALUE] PRIMARY KEY CLUSTERED ( [ID] ) ON [PRIMARY] ) ON [PRIMARY] GO INSERT INTO [GOODS] VALUES('001','电脑','我是描述') INSERT INTO [GOODS] VALUES('001','MP3','我是描述') INSERT INTO [GOODS] VALUES('002','内衣','我是描述') INSERT INTO [GOODS] VALUES('003','袜子','我是描述') GO INSERT INTO [GOODSEXTPROPERTY] VALUES('001','INT','PRICE','价格') INSERT INTO [GOODSEXTPROPERTY] VALUES('001','INT','MEMERY','内存容量') INSERT INTO [GOODSEXTPROPERTY] VALUES('002','INT','PRICE','价格') INSERT INTO [GOODSEXTPROPERTY] VALUES('002','VARCHAR','COLOR','颜色') GO INSERT INTO [GOODSEXTPROPERTYVALUE] VALUES(1,1,'3000') INSERT INTO [GOODSEXTPROPERTYVALUE] VALUES(1,2,'512') INSERT INTO [GOODSEXTPROPERTYVALUE] VALUES(2,2,'256') INSERT INTO [GOODSEXTPROPERTYVALUE] VALUES(3,3,'100') INSERT INTO [GOODSEXTPROPERTYVALUE] VALUES(3,4,'RED') INSERT INTO [GOODSEXTPROPERTYVALUE] VALUES(4,4,'RED') GO
|