表aggregate_monthly_conversations由列的用户_A,用户_B,user_B_location和表monthly_statistics仅由用户_A和用户_B如何添加到表中其他列与属于价值
的我想列user_B_location添加到表monthly_statistics和用适当的值填充它。
为了得到合适的值user_B_location为用户_B表monthly_statistics我可以运行下面的查询:
SELECT t1.user_B_location
FROM aggregate_monthly_conversations AS t1
INNER JOIN monthly_statistics AS t2 ON t1.user_B = t2.user_B
无论如何,我不知道如何将其他列添加到monthly_statistics与查询返回的值填充以上。如果有人能够帮助撰写解决这个问题的查询,我将不胜感激。
谢谢!
您正在使用什么数据库? – 2010-10-27 13:18:05