M
maolu28
Unregistered / Unconfirmed
GUEST, unregistred user!
declare @chr_01 char(20),@chr_02 char(20),@sqlstr varchar(7000)
select @chr_01='mi01'
select @chr_02='maumi'
set @sqlstr='declare @chr_03 char(20) select @chr_03='+@chr_01+' from '+@chr_02+' where mi02=''1'' select @chr_03 '
Exec(@SqlStr)
我测试过,肯定可以。
select @chr_01='mi01'
select @chr_02='maumi'
set @sqlstr='declare @chr_03 char(20) select @chr_03='+@chr_01+' from '+@chr_02+' where mi02=''1'' select @chr_03 '
Exec(@SqlStr)
我测试过,肯定可以。