SELECT TOP(20) *
FROM (SELECT *
FROM [3D_Benchmarks]
JOIN [3D_Slugs] ON [3D_Benchmarks].Id = [3D_Slugs].BenchmarkId) AS tb
ORDER BY tb.FPS DESC;
我收到此错误:
'tb'多次指定了列'Id'。
答案 0 :(得分:14)
而不是select *
使用select table.columnname
或tablename.*
。
答案 1 :(得分:-1)
SELECT *
FROM [3D_Benchmarks]
JOIN [3D_Slugs] ON [3D_Benchmarks].Id = [3D_Slugs].BenchmarkId) AS tb
3D_Benchmarks有id列,3D_Slugs也有id列。
for explame:[3D_Benchmarks] .id as aid,3D_Slugs.id as bid