有两个表student、score,查询前一个表的id、name列,后一个表的total列,查询结果通过两个表的id连接起来
使用别名st和sc替换表名进行查询
SELECT st.id , st.name , sc.total FROM student st , score sc WHERE st.id = sc.id ORDER BY st.id
SQL:查询时给表起别名
原文:https://www.cnblogs.com/ShineLeBlog/p/15019330.html