表的格式如下
A B
上海 2000
宁波 2000
上海 3000
杭洲 3000
----------------
如果我想取出以B字段为组,同一组中A字段的条件为上海,宁波的语句怎么写啊,谢谢了!
不知道你想要什么,呵呵,需求不清楚,你要最终结果是怎样的
没整明白
SQL code:
-------------------------------- ......
string sql = "select * from BugInfo where BugFoundDate between '" + dtp1.Value + "' and '" +dtp2.Value + "'";
if (cmbType.SelectedIndex != 0)
& ......
原数据(部门确定,就这三个部门)
姓名 部门 完成零件1 完成零件2
A 001 100 200
B 001 200 100
C 002 100  ......
我通过查询第一个表的男生和女生的人数 怎么输入到第二张表啊
我的第二张表为 TABLE2 字段 性别 人数
男 0
&nb ......
AAA(员工表)
ID GH XM
1 01 小明
2 02 技安
BBB(出勤表)
ID GH RQ(日期)
1 01 2010-1-10
2 01 ......
比如:
select age,name,score,grade from student
现在我想查询这样的结果:如果想让score <60时grade为0,score>60时grade为原值,
这个语句怎么查询?谢谢
SQL code:
select age,name,score,grade=(case when score <60 then 0 else grade end)
from student
SQL code:
select age,n ......