sql join joining 3 tables

后端 未结 1 1012
一个人的身影
一个人的身影 2021-01-26 17:18

bit of a strange one this one...

Someone wrote a sql that in my mind shouldn\'t work, but it does and it also returns the correct results. I\'ve written a simplified exa

相关标签:
1条回答
  • 2021-01-26 18:11

    Why would you think it shouldn't work? The last bit of the query is pointless though, and you can take it out. It's a simple join on 3 tables:

    select * from #history
    join #transactions on #history.transid = #transactions.transid
    join #client on #transactions.clientId = #client.clientId
    
    0 讨论(0)
提交回复
热议问题