where语句有问题,
b.game_year=(select game_year from soccer_system) and
b.game=(select game from soccer_system)
是否是一对一的关系呢?
b.game_year=(select game_year from soccer_system) and
b.game=(select game from soccer_system)
是否是一对一的关系呢?
解决方案 »
- 一个类型转换的问题,C#高手请帮忙,谢谢
- [又想出一个难题来折磨诸位]new WebClient().DownloadData(url)可否只读取前几行?
- 急切提问,线程中如何不让出现out of memory
- 请教datetime类型插入数据库
- 求教,如何获取xml文件的最后更新时间
- 一个网页设计 想学C#,望大家指引
- 如何在DataGrid显示完整的时间(年月日 时分秒)
- 想做一个象Sqlserver创建视图一样的东西。
- 如果在程序中调用windows的功能来关闭计算机?(等待ing...)
- 毕设需要指导
- 就Applied Microsoft.NET Framework Programming一书中的装箱与拆箱提问。(欢迎参加讨论)
- 又一个问题,关于获得数据记录
我仅能帮你看sql语句,至于逻辑关系是否正确,你就得自己看了
string SQL="select * from soccer_exchange a left join soccer_manger_dispose b "
+"on (a.player_id=b.player01 or a.player_id=b.player02 or "
+"a.player_id=b.player03 or a.player_id=b.player04 or a.player_id=b.player05 or a.player_id=b.player06 or "
+"a.player_id=b.player07 or a.player_id=b.player08 or a.player_id=b.player09 or a.player_id=b.player10 or "
+"a.player_id=b.player11) where a.user_id=user_id and a.state=1 and b.game_year=(select game_year from soccer_system) and "
+"b.game=(select game from soccer_system)";
+"(a.player_id=b.player01 or a.player_id=b.player02 or "
+"a.player_id=b.player03 or a.player_id=b.player04 or a.player_id=b.player05 or "
+"a.player_id=b.player06 or "
+"a.player_id=b.player07 or a.player_id=b.player08 or a.player_id=b.player09 or "
+"a.player_id=b.player10 or a.player_id=b.player11) "
+" where a.user_id=b.user_id and a.state=1 and b.game_year=(select game_year "
+" from soccer_system) and b.game = (select game from soccer_system)";
"select game from soccer_system" 返回结果是唯一的么?否则就出错改为in 吧