dongshen7561 2011-10-19 14:31
浏览 10
已采纳

查询结果可以形成三个不同的表进入一个数组吗?

I am trying to pull all of the records in each of these tables that have a value in Games.date_added that is greater than an inputed date. Trying to pull all the new records.

Can I do that all in one query? Or is it easier to just add a date_added field to each table and query each table separately?

GAMES
id
date_added
game_name
release_date
game_category
game_type
game_console

TROPHIES
trophies_id
game_name
tr_name tr_description
tr_color
tr_ach_value

TROPHY_TOTALS
trophy_totals_id
game_name
bronze_ttl
silver_ttl
gold_ttl
plat_ttl
hidden_ttl

  • 写回答

2条回答 默认 最新

  • duanhuan5409 2011-10-19 14:40
    关注

    It will be much better and clearer if you do 3 separate queries. Each one will give you a different amount of rows. The query given by glglgl that uses 2 joins will result in multiplied rows from the games table. This is because tropies and tropy totals can contain multiple records with same game. Of course if game_name is a unique column than the join will be OK.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了
  • ¥100 H5网页如何调用微信扫一扫功能?
  • ¥15 讲解电路图,付费求解