中国开发网: 论坛: 程序员情感CBD: 贴子 701395
haitao
使用表变量中转就只要1秒钟
declare @tb table(f varchar(100))
insert @tb select f1 from viewABC
select distinct f from @tb

但是这个过程无法作为视图,因为含有declare。。。。。。。


看来的确是mssql的优化“弄巧成拙”!

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录