create table s_orderform(
o_id int auto_increment primary key,
o_buyer_id int,
o_seller_id int,
o_totalprices double,
o_state varchar(50),
o_information varchar(200),
foreign key(o_buyer_id) references s_user(u_id), #外链到s_user表的u_id字段
foreign key(o_seller_id) references s_user(u_id) #外链到s_user表的u_id字段
)
转载于:https://www.cnblogs.com/ruush/p/5655172.html
相关资源:将SQL建表语句转换成表格文档(SQL2XLS 附源代码)