CREATE TABLE CAILIAO
(
ID DECIMAL(9) IDENTITY(1,1) NOT NULL,
CODE nvarchar(20) NOT NULL,
NAMES NVARCHAR(100) NOT NULL,
TYPES NVARCHAR(30) NOT NULL,
PRICE FLOAT NOT NULL,
AMOUNT FLOAT NOT NULL,
DATES DATETIME NOT NULL,
constraint ID_PK PRIMARY KEY CLUSTERED (ID)
)
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A14','只文A',100,3,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A13','只文A',100,4,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A12','只文A',100,1,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A11','只文A',100,50,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A7','只文B',100,10,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A6','只文B',100,7,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A4','只文B',100,1,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A5','只文C',100,11,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A10','只文D',100,42,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A9','只文D',100,11,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A8','只文D',100,5,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A3','只文E',100,2,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A2','只文E',100,3,getdate())
INSERT INTO CAILIAO(CODE,NAMES,TYPES,PRICE,AMOUNT,DATES)VALUES
('CAI'+RIGHT(1000000,6),'��A1','只文EP',100,3,getdate())
SELECT * FROM CAILIAO
CREATE TABLE GUYUAN
(
USER_ID DECIMAL(9) NOT NULL IDENTITY(1,1),
USER_NAME VARCHAR(30) NOT NULL,
USER_DATE DATETIME NOT NULL,
USER_MONEY DECIMAL NOT NULL
CONSTRAINT USER_ID_PK PRIMARY KEY CLUSTERED(USER_ID)
)
INSERT INTO GUYUAN(USER_NAME,USER_DATE,USER_MONEY) VALUES('恐似',getdate(),1500)
INSERT INTO GUYUAN(USER_NAME,USER_DATE,USER_MONEY) VALUES('�見',getdate(),2500)
INSERT INTO GUYUAN(USER_NAME,USER_DATE,USER_MONEY) VALUES('於炊',getdate(),3500)
INSERT INTO GUYUAN(USER_NAME,USER_DATE,USER_MONEY) VALUES('挈�',getdate(),4500)
INSERT INTO GUYUAN(USER_NAME,USER_DATE,USER_MONEY) VALUES('於正',getdate(),5500)
INSERT INTO GUYUAN(USER_NAME,USER_DATE,USER_MONEY) VALUES('侷恐',getdate(),6500)
INSERT INTO GUYUAN(USER_NAME,USER_DATE,USER_MONEY) VALUES('侷�',getdate(),7500)