Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 2 个数据表
表 1(Type6)有字段:StopNo
表 2 (StationName) 有字段:StopNo、Name
我想要做的是加入 2 个表,所以在 sql 中它会是这样的:
SELECT DISTINCT Type6.STOPNO, StationName.NAME FROM Type6 JOIN StationName on StationName.STOPNO=Type6.STOPNO order by NAME"
如何使用 2 个包含相同信息的数据表来执行此操作?
...让我知道这是否有效...
Dim Result = (From tp6 As DataRow In Type6 Join stNm As DataRow In StationName On tp6.Item("STOPNO") Equals stNm.Item("STOPNO") Select x = New With {.STOPNO = tp6.Item("STOPNO"), .NAME = stNm.Item("NAME")}).Distinct