0

我要做的是连接table1中的用户ID以连接table2中的用户名。而不是在页面上显示他的用户名。减少冗余。

谁能带我上路?

4

1 回答 1

1

用于跨表将数据绑定在一起的SQL 连接适用于这种情况。语法将类似于以下内容:

select username
from table1
join table2
on table1.userId = table2.userId
于 2013-02-10T00:40:12.510 回答