create table Tou(
nid int primary key not null auto_increment,--主键
gid int, --销售员ID
name varchar(10) --销售员名字
)create table Xi(
xid int primary key not null auto_increment,--主键
jine decimal(9,2), --销售金额
shi date, --时间
gid int --销售员ID
)使用存储过程实现销售员 时间
1...........
2...........
金额:...
nid int primary key not null auto_increment,--主键
gid int, --销售员ID
name varchar(10) --销售员名字
)create table Xi(
xid int primary key not null auto_increment,--主键
jine decimal(9,2), --销售金额
shi date, --时间
gid int --销售员ID
)使用存储过程实现销售员 时间
1...........
2...........
金额:...
select gid,date
from Xi
UNION
select @a:='金额:',(select sum(jine) from Xi)