这个SQL语句怎么执行?

declare @SQL varchar(200)
set @SQL='select * from passedcars'
用什么办法执行@SQL中的语句(要用@SQL代替后面的语句)?

---------------------------------------------------------------

exec(@sql)

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus