34,590
社区成员
发帖
与我相关
我的任务
分享
--订单表
create table orders(
ordersId bigint primary key identity(1,1), -- 订单号
userId bigint constraint fk_client_id references users(userId), --说明是哪个用户下的订单
orderDate datetime default getDate(), --订单时间
payMode varchar(20) check (payMode in('货到付款','支付宝付款')) default '货到付款',
isPay bit check( isPay in(0,1)),--0表示未付款,1表示已付款
totalPrice float not null --总价格
)
insert into orders(userId,isPay,totalPrice) values('1','0','120')