日期:2014-05-18 浏览次数:20532 次
declare @name char(20) set @name='master' exec('select * from '+@name+'.sys.objects')
------解决方案--------------------
declare @name char(20) set @name='master' exec('select * from '+@name+'.sys.objects')
------解决方案--------------------
declare @name char(20) set @name='master' exec('select * from '+@name+'.sys.objects') --都是山寨我的,哼哼哼[img=http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/5.gif][/img]
------解决方案--------------------
declare @name char(20) set @name='master' exec('select '''+@name+''',max(create_date) from '+@name+'.sys.objects') -------------------- ----------------------- master 2012-03-31 11:34:07.700 (1 row(s) affected)