GO (Transact-SQL) 语法 GO [count] 参数 count 为一个正整数. GO 之前的批处理将执行指定的次数. 源文档 <http://msdn.microsoft.com/zh-cn/library/ms188037.aspx> SELECT * FROM #ProductTable; OUTPUT 源文档 <http://www.sqllion.com/2011/09/go-n-times/>
select * , t3.Name from t1 left join t2 on t1.sysno = t2.Asysno left join t3 on t3.sysno = t2.Bsysno 上面SQL语句中,t3表数据很多;此时查询t3.Name会很慢,如果把t3和name干掉,秒中就能查询出数据,这样就有了这种sql select * , (select top 1 name from t3 where sysno =t2.Bsysno)Name from t1 left join