private void button5_Click(object sender, EventArgs e)
{
string s = "select workers.wnum as 员工号,workers.wname as 员工名,";
s += "sum(relate.wage) as 总工资 from workers,relate ";
s += "where workers.wnum=relate.wnum ";
s += "and workers.wnum in (select wnum from relate group by wnum having count(cnum)>=2)";
s += "group by workers.wnum,workers.wname";
loadLV(listView2,s);
}
网友评论